use warnings; use strict; my $string = '12 abcdefghijklmnopqrstuvwxyz'; $string =~ s/^(\d+) (.*)/substr $2, 0, $1/e; print "$string\n";
Prints:
abcdefghijkl
In reply to Re: Using previous match in the same matching regexp
by GrandFather
in thread Using previous match in the same matching regexp
by cyberconte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |