neversaint has asked for the wisdom of the Perl Monks concerning the following question:
Now from that code I expect it to returnperl -MData::Dumper -e ' @ar1 = qw( a b c d e ); @sl = qw( b d ); @ar2 = @ar1[@sl]; print Dumper \@ar2;'
But it doesn't. What's wrong with it? And is there a quicker/better way to do it?$VAR1 = [ 'a', 'c', 'e' ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding the Remaining of Array by Slice - A quick way?
by Zaxo (Archbishop) on Aug 29, 2005 at 09:21 UTC | |
|
Re: Finding the Remaining of Array by Slice - A quick way?
by davidrw (Prior) on Aug 29, 2005 at 11:47 UTC | |
|
Re: Finding the Remaining of Array by Slice - A quick way?
by Fang (Pilgrim) on Aug 29, 2005 at 09:25 UTC | |
|
Re: Finding the Remaining of Array by Slice - A quick way?
by kprasanna_79 (Hermit) on Aug 29, 2005 at 10:56 UTC |