method1: $item = 'path/path1==new'; my ($epath, $relt) = split /==/, $item;