in reply to Variable assignment confusion
my ($new_retid) = $retid =~ /(^\d{4}_\d{3})$/; $new_retid ||= $retid.'_001'; [download]
Thanks!