Keep It Simple, Stupid | |
PerlMonks |
Re^6: Naming file handles with variables?by TGI (Parson) |
on May 03, 2009 at 15:28 UTC ( [id://761595]=note: print w/replies, xml ) | Need Help?? |
Interesting technique. Are there any advantages to $foo[@foo] = 'var' over push @foo, 'var' ?Anyone foolish enough to change the starting index of their arrays with "$[" will find that $foo[@foo] = 'var' breaks. But then they deserve what they get. However, push and map will function even in the dire weirdness imposed by defining arrays to start at index 23. For completeness sake, here's the map implementation, even though you know perfectly well how to do it.
Update: fixed dumb typos, thanks to GrandFather.
In Section
Seekers of Perl Wisdom
|
|