Ananda has asked for the wisdom of the Perl Monks concerning the following question:
Please do post your comments and also please suggest alternate ways to acheive this functionality. Thanks in advanse., Anandatirtha$path = "\\default\\main\\Anand\\toipcs\\Tutorials\\internet"; $curPath = $path; $curPath =~ !\default\main\(.*)\Tutorials\internet!$1!; $parentdir = $curPath; print "parent Directory : $curPath\n"; ($Pdir,$Sdir) =~ m!(.*)\(.*)$!$1,$2; print "parent branch : $Pdir \t sub branch $Sdir";
Edit: Added <code> tags. larsen
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get Parent Directory
by gjb (Vicar) on Oct 22, 2002 at 10:11 UTC | |
|
Re: Get Parent Directory
by alfie (Pilgrim) on Oct 22, 2002 at 10:38 UTC | |
|
Re: Get Parent Directory
by BrowserUk (Patriarch) on Oct 22, 2002 at 10:29 UTC | |
by Anonymous Monk on Oct 22, 2002 at 12:05 UTC | |
by BrowserUk (Patriarch) on Oct 22, 2002 at 12:42 UTC | |
by Ananda (Pilgrim) on Oct 23, 2002 at 04:06 UTC |