NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
this doesn't bother me (Score:1)
Perl has foibles like this, too:
..and PHP has exactly what you suggested.
Just because PHP is often intolerable doesn't mean that everything it does is wronger than Perl.
rjbs
Reply to This
I think you misunderstood (Score:1)
PHP removes the index, which is the problematic part. Your Perl example shows exactly what my Perl example shows, which is that Perl just puts the value on
undefand keeps the index, so you can iterate without a problem. This is far from a foible and is the correct and best result. This is not a Perl "feature", Python and Ruby behave the exact same way. PHP is the different here, and it is indeed stupid.