in reply to Re: modify list through grep
in thread modify list through grep
I was excited by your answer at first because I thought it was that trick I saw for making aliases, and which I can never remember. ;-)
But then I realized that you're using a glob, which means you could simply write
@l = ( "a", "b", "c" ); *m = \@l; $m[0] = "z"; print "@l\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: modify list through grep
by calin (Deacon) on Nov 26, 2006 at 16:46 UTC | |
by syntactic (Initiate) on Nov 26, 2006 at 21:30 UTC | |
by tye (Sage) on Nov 27, 2006 at 06:19 UTC |