K
kstinson00
I have the following logic in a perl script:
if (! $Department =~ m/^0*(\d){1,3}$/ ) {
$Department = "000";
}
The intent was to find any value of $Department that was not 1 to 3
digits excluding leading 0's and set the var to "000" else the value
just be as is. In other words this is a basic "edit" on the department
field.
The above does not seem to work.
Your help is appreciated.
Kevin
if (! $Department =~ m/^0*(\d){1,3}$/ ) {
$Department = "000";
}
The intent was to find any value of $Department that was not 1 to 3
digits excluding leading 0's and set the var to "000" else the value
just be as is. In other words this is a basic "edit" on the department
field.
The above does not seem to work.
Your help is appreciated.
Kevin