Perl's "sigils" are dereference operators , not true sigils ; BASIC had sigisl, PHP has sigils, Raku has sigils ... BASH and Perl 5 have dereference operators
if you think of them as dereference operators it is a lot easier to read Perl code
Partly yes, because $$var in PHP reads: variable with name stored in $var, while in Perl reads: variable which $var refers to.
Partly no, because $var and @var and %var are completely independent variables, and they likely shouldn't if they were dereferencing the same thing I guess.
Also, var itself is a bareword and does not exist as a variable without its sigil and outside of symbol table.
"$var and @var
and %var are completely independent variables"
they're not independent in the symbol table
"var itself" would be a subroutine, which is stored in the same symbol table and accessed by using the & "sigil" if you really want to use "&", though the compiler tries subs first when encountering barewords
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Perl's "sigils" are dereference operators , not true sigils ; BASIC had sigisl, PHP has sigils, Raku has sigils ... BASH and Perl 5 have dereference operators
if you think of them as dereference operators it is a lot easier to read Perl code
Partly yes, because
$$var
in PHP reads: variable with name stored in$var
, while in Perl reads: variable which$var
refers to.Partly no, because
$var
and@var
and%var
are completely independent variables, and they likely shouldn't if they were dereferencing the same thing I guess.Also,
var
itself is a bareword and does not exist as a variable without its sigil and outside of symbol table."$var and @var and %var are completely independent variables"
they're not independent in the symbol table
"
var
itself" would be a subroutine, which is stored in the same symbol table and accessed by using the & "sigil" if you really want to use "&", though the compiler tries subs first when encountering barewords