my ($new_retid) = $retid =~ /_\d{3}$/ || "${retid}_001";
This of course does not work. $new_retid is always a 1.
It always bugs me that I can't remeber stuff like this. And trying to find answers like this quickly is a challenge(but I do try).
As always,
Thank you!
In reply to Variable assignment confusion by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |