in reply to difference in regex

Just for fun and TIMTOWTDI: If you happen to want speed, use rindex and substr.

my $str = "a,b,c,5"; my $i = rindex $str, ','; my ($path,$value); if ($i<0) { $path=$str } else { $path = substr($str, 0, $i); $value = substr($str, $i+1) }