Argh, I did it again! I used shift like this:
shift; do something with $_;
and then spent longer than I care to admit wondering why I wasn't getting the milage I expected. What I needed of course was:
$_ = shift; do something with $_;
Why doesn't shift (and similar usage) assign to $_ if no lvalue is specified? It doesn't DWIM!
In reply to shift doesn't DWIM by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |