Re: Naming the @{[]} operator
"Chasecreek Systemhouse" <[email protected]> Thu, 13 Jul 2006 13:10:07 -0400
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
On 7/13/06, A. Pagaltzis <[email protected]> wrote: > Modification of a read-only value attempted at foo line 2. Yeah, I get that a lot and I have to burn another variable to get around it; > for( @{[ qw( 1 2 3 ) ]} ) { > $_ = $_ * $_; # contrived Now this is good, less vars and IMHO better "readable* code. Thx =) -- WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/