mobiGeek has asked for the wisdom of the Perl Monks concerning the following question:
I want a simple program that is given a list of files (say, output from "find") and for each file, prints the containing directory.
For example:
$ pwd /home/mobiGeek $ perl dirs.pl ../foo.html /etc/passwd /a/b/c/smile.gif /home /etc /a/b/cThanks in advance,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I get the directory containing a given file?
by wog (Curate) on Feb 24, 2002 at 18:48 UTC | |
by mobiGeek (Beadle) on Feb 24, 2002 at 19:19 UTC | |
by wog (Curate) on Feb 24, 2002 at 20:02 UTC |