in reply to Re^4: get a certain number of words from a line
in thread get a certain number of words from a line

Hmmm... Apparently not for my perl...
greg@sparky:~/test$ cat ./list_ref #!/usr/bin/perl -w @a=qw/zero one two three four five/; $ref=\(1..3); @b=@a[@$ref]; print "\n \@a=@a\n \$ref=$ref\n \@b=@b\n\n"; greg@sparky:~/test$ ./list_ref @a=zero one two three four five $ref=ARRAY(0x813dcc0) @b=one two three greg@sparky:~/test$ perl -v This is perl, v5.8.0 built for i486-linux Copyright 1987-2002, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. <snip>
...And sorry for the typo. This thread (among others) has finally inspired me to create my first perlmonks .sig.


-- All code is 100% tested and functional unless otherwise noted.