A lot of scripting languages like Perl, Awk, Bash, PHP, etc. use a $ sign before identifier names. I've tried to look up why but never had a satisfactory answer.
Why is $ in identifier names for so many languages?
history;scripting
The Bourne shell or its predecessor was probably the origin of the convention.  Shells tend to use $foo to refer to a shell variable or environment variable, whereas just foo is taken as a literal string (which could be a command name, a file name, or just a word to be passed to another command).It's probably a matter of minimizing how much you have to type.  In most programming languages, most of what you type is going to be keywords (from a small fixed set) and names of things that have been declared; it makes sense to use just a name for those.  String literals are enclosed in quotation marks (single or double) to distinguish them syntactically.In an interactive shell, most of the things you type are going to be command names and file names, so having an undecorated form for them makes sense.  Variable names aren't used quite as often, so preceding them with $ is a straightforward way to distinguish them.The trailing $ that some BASICs use for string variables (as opposed to numeric variables) was probably an inspiration as well.Perl's choice to use $ for scalar variables was undoubtedly inspired by shells such as the Bourne shell, and early versions of Perl commonly treated barewords as string literals (print FOO and print FOO were equivalent).  This use of barewords has been deprecated in more modern versions of Perl, but the sigils remain, and are mostly used to distinguish different kinds of variables.  Perhaps if Perl were being designed from scratch, scalar variables might be denoted by an empty sigil, but that didn't happen.(BTW, Awk doesn't use sigils.  It does have a $ syntax, but it refers to field numbers.  NF is the number of fields; $NF is the last (the NFth) field.)