3 ms·
I'm not sure I understand what counts as a sigil and what doesn't. How many sigils does the following line have? > echo $foo # $foo refers to the contents of
by __MatrixMan__ 3y ago
I'm not sure I understand what counts as a sigil and what doesn't. How many sigils does the following line have?
> echo $foo # $foo refers to the contents of the variable foo
- luuuzeta 3y agoThe author defines a _sigil_ as follows: * a non-alphabetic character * that is at the start of a word * that communicates meta-information about the word. He gives the example of `echo $USER`, where `$` is a single that communicates that `USER` is a variable, presumably with some contents. Thus, I'd wager `$` is a sigil in `$foo`.
- __MatrixMan__ 3y agoI suppose "word" is the constraining factor there, I was thinking of > and # as sigils too, which--if you're willing to be a bit loose with what a "word" is--contradicts that they're unpopular.