in reply to Stripping parts of paths from directory names

I'm not entirely clear what you mean, but does something like thid do the trick?

my $file_path = 'home/sites/site18/users/rjoseph/web/images/image1.jpg'; my $path = '/home/sites/site18/users/rjoseph/'; $file_path =~ s/^$path//;
--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me