Hi pravatka,
I am trying to print each number from variable x.
Maybe you could use something simpler than the example you chose, which demonstrates named captures?
use strict; use warnings; use feature qw/ say /; my $x = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'; say $x; my @matches = ( $x =~ m/\d+/g ); say for @matches; __END__
Hope this helps!
In reply to Re: Regular expression
by 1nickt
in thread Regular expression
by pravakta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |