paulpi has asked for the wisdom of the Perl Monks concerning the following question:
Am coding to display directory contents on a HTML page and liked the look of File::Listing to parse the directory. My problem is that calling the parse_dir command doesn't work as I thought it would. The manual (un)helpfully provides only this to describe it's application:
parse_dir(`ls -l`)
But hey that's ok, I need to move up/down directory trees so I thought it'd be a doddle to change the function call thus:
my $dir = "/foo";
parse_dir("ls -l $dir")
Except it doesn't work!!!
even calling the function with single quotes i.e.parse_dir('ls -l') won't return.
I can get around it by calling a chdir() command prior to issuing the parse_dir call but i'm running under mod_perl so that just opens another can of worms...
What's with the back apostophe?! And how can I get around this with my teeth intact?...it's tarnishing my saintly demeanour!!
Paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The Apostrophe According To St Paul
by Sidhekin (Priest) on Jul 03, 2004 at 16:28 UTC | |
by paulpi (Initiate) on Jul 03, 2004 at 16:39 UTC | |
|
Re: The Apostrophe According To St Paul
by theorbtwo (Prior) on Jul 03, 2004 at 21:09 UTC | |
|
Re: The Apostrophe According To St Paul
by tachyon (Chancellor) on Jul 04, 2004 at 05:08 UTC | |
by dragonchild (Archbishop) on Jul 05, 2004 at 06:02 UTC | |
by tachyon (Chancellor) on Jul 05, 2004 at 06:18 UTC |