[pgh-pm] Can't find file

Weber, Larry A laweber at switch.com
Tue Apr 12 06:53:12 PDT 2005


I am having a problem with a Perl script's ability to find files on our
company's network.

I have two PC's:
1. Windows XP - Perl 5.8.4 (script was written and tested on this pc)
2. Windows 98 - Perl 5.8.0

The files I am trying to open are on the network drive P:

>From the xp computer I can open the files on P: with no problems.

I copied the .pl script to the 98 pc and the script fails to open files on
P:

If I share the 98's drive and access it with the xp computer, I can access
the files on P:.

The error message from die shows the correct file name (with \\).

I created an executable on the xp pc and it runs fine.  When I run the
executable on the 98 pc it fails to find the network files.

The 98 pc can access the files with text editors so I know the network
connection is o.k.


The filesnames are stored in an array @allfiles and passed to a subroutine
to process each.  The following is the beginning of the subroutine.  The
files are stored in the array with their complete pathname.  $_ does print
out correctly in the error message.

foreach (@allfiles)
{
    &p1;
}

sub p1
{
   # .c, .h, .asm, .inc, .bat, .lnk, or makefile file processing only
   if (/\.c/i or /\.h/i or /\.asm/i or /\.inc/i or /\.bat/i or /\.lnk/i or
/makefile/i)
   {
      open INFILE, $_ or die "Drainbamage could not open input file $_\n";



Help!

-laweber



More information about the pgh-pm mailing list