Of course, this could have been:

  my (@str) = $str =~ /([a-zA-Z]+)(\d+)([a-zA-Z]+)?/;

eliminating the need to refer specifically to the positional variables.

Absolutely, though it might be obfuscated to the OP


        $str[1] =~ s/^0+//;     # strip leading 0s from digit portion


Personally, I typically use $str[1] += 0, but obviously that's a style
thing.

Clever, never thought (probably never would have either) to do it that way.
_______________________________________________
vox-tech mailing list
[email protected]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to