in reply to Re^3: Accidentally creating hash elements with grep { defined } on a hash slice
in thread Accidentally creating hash elements with grep { defined } on a hash slice
Why does grep require lvalues?So you can suprise people with what this does:
perl -e "@in = (1..5); @out = grep { $_++ } @in; print qq{@in}"
But as far as I can tell, there is no good reason.Oh - a good reason? Sorry, haven't got one of them. Move along please, nothing to see here.
--
.sig : File not found.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Accidentally creating hash elements with grep { defined } on a hash slice
by ikegami (Patriarch) on Nov 04, 2008 at 15:21 UTC |