Another problem (sorry ;-) )

[email protected] (Nik Gare) Fri, 17 Sep 1999 11:46:29 +0100
Newsgroups perl.riscos
Message-ID <[email protected]>
Hi,
I've given up on Fly and GD for ther moment (but I will have another go in a
couple of days)
I have encountered another problem which I can't fix:

Using perl, I'm trying to do a directory listing (to use a navigation bar in
an html page). This is the bit of the script:
# lets list the directory called by $soh - (hardware or software)
opendir('soh', "$soh") ;
while (defined($menuitem = <$soh/*>)) {
$menuitem =~ s#.*/##;
# The next four lines gets rid of the .csv extension
chop $menuitem ; 
chop $menuitem ;
chop $menuitem ;
chop $menuitem ;
print  "<tr><td align=right>\n";
print  "<a href=\"mainscript.pl?soh=$soh&type=" . $menuitem . "\">\n";
print  "<font size=\"-1\">$menuitem<font>\n";
print  "</a></td></tr>\n";
}
closedir ('soh') ;

This works fine here because I can set the CSD to the directory with the perl
script (no cgi-bin), but when I upload it, it does a directory or root, ie it
comes up with usr, lost+found, etc.
Is there a way to make perl set the directory to where the script is, or do I
need to know the full pathname of the directory (ie /usr/...../public_html/)?

TTFN
Nik

-- 
[email protected]
http://www.cheddarcheese.webprovider.com
( http://www.cheddarcheese.de when my provider lets me use perl scripts )