in reply to Performace calculation

Unless you are doing this thousands of times, it will hardly matter which one is faster.

If you must know, you can always use the Benchmark module, and run a simple test:

#!/usr/bin/perl use strict; use warnings; use Benchmark 'cmpthese'; our $item = '"path/path1==new'; cmpthese(-1, { method1 => 'my ($epath, $relt) = split /==/, $item', method2 => 'my ($epath, $relt) = $item =~ /([^=]*)==(.*)/', }); __END__ Rate method2 method1 method2 334042/s -- -38% method1 535924/s 60% --
Method 1 will about 1.1 microseconds faster (at least, on my box). So, if I have a million of them, method1 will gain 1 second over method2. That's hardly worth the trouble.

I'd pick method1 because, IMO, it's more clear to see what it does.

Oh, and both methods use a regular expression anyway.

Perl --((8:>*