in reply to Manipulating directory paths

if you have ONLY ONE "log" directory,

my $path = "/home/user/phase/dir1/log/Illinois/";
my $path2;
($path,$path)=split(/log/,$path);

if you have 1 or more log directories inside a log directory, then

my $path = "/home/user/phase/dir1/log/Illinois/log/somefile/log/someotherfile...";
my @Paths;
@Paths=split(/log/,$path);

then you can join any sections of the paths back together as you wish, i.e.

$path = $Paths[0]."log".$Paths[1]."log"........

www.arobcorp.com