Shorter (parentheses saved and used here); arguably 'more straightforward' or 'maintainable':
my $txt="Version=2010-09-01_17-29-04 Build=26"; my ($build) = $txt =~ /(?:=)(\d+)$/; print $build;
Output: 26
In reply to Re: Use of uninitialized value when using regex
by ww
in thread Use of uninitialized value when using regex
by PerlScholar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |