Welcome to the Monastery | |
PerlMonks |
Re^7: appending a variableby Marshall (Canon) |
on Apr 29, 2022 at 01:28 UTC ( [id://11143416]=note: print w/replies, xml ) | Need Help?? |
my ($opstr) = $vmstr =~ /-(\d\d)$/; will result in an undefined value for $opstr because there is only one digit after the "-" instead of 2 digits. Better: >my ($opstr) = $vmstr =~ /-(\d+)$/; Why are you ignoring the warnings and errors that Perl is printing out? Always put: at the top of your script.
In Section
Seekers of Perl Wisdom
|
|