Harry Putnam wrote:
Shawn H Corey <[email protected]> writes:
my $var = 'ev 100421 4';
my @numbers = $var =~ /(\d+)/g;
print Dumper \...@numbers;
Nice... that's a nifty way to get some clean numbers.
If you only want to match [0-9], then best use that in stead of \d,
because \d matches 250+ codepoints.
Unless you are sure that your input is always ASCII-only, then \d will
do fine.
--
Ruud
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/