in reply to increment id num
If you don't want to use magic:$array[0]++;
my ($letter, $number) = $array[0] =~ /(\w)(\d+)/; $number++; $number = sprintf("%.6d", $number); $array[0] = $letter . $number;
Those steps could be simplified, but I did them step by step so that you could see what was going on.
Cheers - L~R
|
|---|