my ($len,$substring) = ($string =~ /^(\d+) ((??{"(?s).{$1}"}))/s);
See perlre on (?imsx-imsx).
Makeshifts last the longest.
In reply to Re: Using previous match in the same matching regexp (now with newlines!)
by Aristotle
in thread Using previous match in the same matching regexp (now with newlines!)
by cyberconte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |