Re: Another problem (sorry ;-) )
[email protected] (Nik Gare) Fri, 17 Sep 1999 16:44:58 +0100
| Newsgroups | perl.riscos |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]>, <[email protected]> wrote: > > > opendir (SOH,"."); # you do not need the 's around the soh, and "." is > > > "here" on unix > > So how would I list a subdirectory defined by $soh, ie the hardware or > > software directory? > If $soh contains just a directory name that will work, but remember that > "." is where the script is run and that "/......" is the system root not > the web root, so if $soh starts with a "/" you will need to do some surgery > on the full name to convert it to an appropriate path. the URL is going to be http://www.<myURL>.com/script.pl?soh=hardware This is interpretted correctly by the script (to check I just got it to output the value) So, how do I get the script to list the contents of the $soh directory? I've tried using opendir (SOH,"./$sto") but that didn't work (of cource) Denis Howe suggested using $_ = $0; , but this doesn' seem to have any effect, so I tried (SOH,"$_/$sto") but that doesn't work either. > Hope that helps. Sort of ;-) > Richard Proctor (Still at work for another hour) TTFN Nik (still at home for the rest of the day :-/ ) -- [email protected] http://www.cheddarcheese.webprovider.com ( http://www.cheddarcheese.de when my provider lets me use perl scripts )