in reply to Perl's POD's description of the use of capturing special variables.
I would like to see more of the second example in the docs. :)use strict; no warnings; my @data = (1,2,3,undef,4,5); for (@data) { /(\d+)/; print $1 if $1; } print "\n"; for (@data) { my ($numb) = $_ =~ /(\d+)/; print $numb if $numb; } print "\n";
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl's POD's description of the use of capturing special variables.
by PodMaster (Abbot) on Apr 06, 2004 at 17:38 UTC |