[vox-tech] Matching Contents of Lists

Jay Strauss me at heyjay.com
Fri Jul 8 13:41:43 PDT 2005



> 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.


More information about the vox-tech mailing list