Update: Just ignore this entire node, it's completely wrong. I'd like to blame it on answering before I finish my first cup of coffee, but in fact I just learned something new: the $ matches the end of line characters too, so my suggestion was entirely wrong. Thanks ++ to jethro for the catch, and I'm sorry for the hideously ugly node!
You're forgetting the end-of-line character(s). Try this:
my ($build) = ($vadata =~ /=(\d+)\s*$/);...roboticus
Update: Fixed code, added parenthesis around $build. Thanks to Erez for pointing it out. An intermediate update was:
You're forgetting the end-of-line character(s). Try this regex: /=(\d+)\s*$/
Update: I replaced the node content, as it was simpler than trying to edit it to show differences between original and updated content.
In reply to Re: Use of uninitialized value when using regex
by roboticus
in thread Use of uninitialized value when using regex
by PerlScholar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |