in reply to I've never seen this before - $#a = 4 - ??
That can be used to allocate memory for an array before filling it up. It created five elements in @a and sets them all to undef.
Here's an example:
perl -MData::Dumper -e '$#foo = 4; print Dumper \@foo'
|
---|
In Section
Seekers of Perl Wisdom