in reply to A "harmless" alternative to 'map{}'?
Internally, what's the difference? Why would the first not fail?perl -e '@a = map {$_+=1 } (1..3); print "@a\n";' # OK perl -e '@a = map {$_+=1 } (1,2,3); print "@a\n";' # Modification of a + read-only value attempted at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A "harmless" alternative to 'map{}'?
by flounder99 (Friar) on Sep 13, 2002 at 15:24 UTC |