4 ms·
I always assumed it originated with Perl, where $ is for scalars and @ for arrays.
by elric 4y ago
I always assumed it originated with Perl, where $ is for scalars and @ for arrays.
- avian 4y agoI'm sure this use of $ character is much older than Perl. One counter-example I know first hand: Sinclair ROM BASIC uses $ for denoting strings, in both variable and function names. The one I have in a Spectrum is copyrighted 1982, around 5 years before first Perl was released. I'm sure there are older examples like this.
- elric 4y agoYou're right, seems like this usage goes back to at least 1964 in BASIC.