Re: in what array do all the $1,$2,... live?
- From: Bob Walton <see.sig@xxxxxxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 22:58:18 -0400
jidanni@xxxxxxxxxxx wrote:
What is the name of the array where all the $1,$2,... live?
Or do I really need to gather them up manually:
@all_the_matches=($1,$2,$3,$4,$5,...);
man perlvar doesn't mention it.
Well, you can easily put them all in whatever array you want:
use strict;
use warnings;
my $string='abc';
my @array=$string=~/(.)(.)(.)/;
print join ':',@array;
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
.
- References:
- in what array do all the $1,$2,... live?
- From: jidanni
- in what array do all the $1,$2,... live?
- Prev by Date: Re: in what array do all the $1,$2,... live?
- Next by Date: Re: Using fcntl and |= - "Argument .... isn't numeric in bitwise or ..."
- Previous by thread: Re: in what array do all the $1,$2,... live?
- Next by thread: FAQ 3.21 How can I compile my Perl program into byte code or C?
- Index(es):
Relevant Pages
|