UPDATED: Having been censured for answering an easy question, I'll try going all Perlmonks.
my $FOUR_DIGIT_CAPTURE = qr/ ( # left as an exercise ) /x; while (<DATA>) { if (my ($four_digit_num) = /$FOUR_DIGIT_CAPTURE/) { print # left as an exercise } else { # left as an exercise } } __DATA__ j9999120.125 Be sure to include lots of interesting test cases.
In reply to Re: How to extract the 4 number in the filename?
by Narveson
in thread How to extract the 4 number in the filename?
by padawan_linuxero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |