RajNaidu has asked for the wisdom of the Perl Monks concerning the following question:

Given a directory say "$workdir" how do I navigate the $workdir further. 

 Eg : $workdir/a1/b1/c1/d1

 How do I get to the last directory d1 in $workdir in perl.

-Rajini

  • Comment on To navigate further in the given directory

Replies are listed 'Best First'.
Re: To navigate further in the given directory
by AnomalousMonk (Archbishop) on Nov 12, 2009 at 08:31 UTC
    Also maybe  perldoc -fchdir?
Re: To navigate further in the given directory
by Anonymous Monk on Nov 12, 2009 at 07:23 UTC
Re: To navigate further in the given directory
by rovf (Priest) on Nov 12, 2009 at 14:27 UTC
    How do I get to the last directory

    What do you mean by get to? Open it? Get its inode number? Get its content? Extract the directory name from the directory path (i.e. pure string handling)?

    -- 
    Ronald Fischer <ynnor@mm.st>