in reply to Length of first captured match
The additional ",''" is necessary to satisfy "use warnings" - which would otherwise complain about "Use of uninitialized value in length at line xx" in the case that the match was not found.my $len = length shift @{ [ $x =~ /(\d+)$/ ,'' ] };
"For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Length of first captured match
by ikegami (Patriarch) on May 07, 2006 at 01:27 UTC |