Hi there.  You're using a platform with which I have very little 
experience, but here are two guesses:

Is the network drive mapped the same way in the environment that the 
webserver uses?  On UNIX systems, it is common to find that things work 
differently when running from cron or a webserver because the environment 
is different.

Second, when you run the following script from a webserver, are you 
including lines that print appropriate headers?  It won't work correctly 
otherwise.  You might look into CGI.pm for help on doing this.

Good luck!

Cheers,
Jeff

At 01:59 PM 6/6/01 -0500, Swalve, Lane wrote:
>Hello all-
>I am trying to get a directory listing of a mapped network drive using perl.
>When I use the code I have in a perlscript it works fine.  however when I
>put the same lines in a perlscript that is a cgi script it does not work.
>Any ideas why?  here are the lines I used
>
>$c=opendir(Dir,"//ISG000011sfs001/data");
>@a= readdir (Dir);
>
>foreach $one(@a){
>    print "$one\n";
>}
>when I run this script it prints out the directories.  However when I use
>these same lines in a cgi script and print the array out I get nothing.
>Help!
>
>what I am trying to do is search each directory for a setup.exe file for a
>drop down box listing.
>by the way it is running on IIS4 with the active state Win32 PERL.


Reply via email to