in reply to Many birds, single cage...
The first set of parens goes into $1, and the second (($rd) in this case) goes into $2. If you just want only one of the parenthesized bits, then you have to explicitly check $1, $2, and $3 yourself. Something like this:
$strange_thing =~ m/($large)|$wei($rd)|($stra)$nge/; my $piece = $1 || $2 || $3;
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Many birds, single cage...
by Enlil (Parson) on Dec 09, 2003 at 21:41 UTC | |
|
Re: Re: Many birds, single cage...
by monsieur_champs (Curate) on Dec 09, 2003 at 21:28 UTC | |
by mr_mischief (Monsignor) on Dec 09, 2003 at 22:42 UTC | |
by monsieur_champs (Curate) on Dec 10, 2003 at 14:09 UTC | |
by mr_mischief (Monsignor) on Dec 10, 2003 at 14:51 UTC | |
by monsieur_champs (Curate) on Dec 10, 2003 at 17:27 UTC |