Perl: the Markov chain saw | |
PerlMonks |
Re: define variable name on the wayby amon (Scribe) |
on Apr 27, 2014 at 18:10 UTC ( [id://1084015]=note: print w/replies, xml ) | Need Help?? |
There is a feature similar to this in Perl, but this is considered to be a very bad idea, because it makes code utterly unmaintainable. Use arrays instead.
You can also use variables for the 0 or 1: “my $index = 0; $array[$index] = "hello"” Or you could use hashes
Again, you could also use variables:
Edit: properly escaped square brackets
In Section
Seekers of Perl Wisdom
|
|