Harry Putnam wrote:
Shawn H Corey <shawnhco...@gmail.com> 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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to