Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My script is very simple (or so I thought). I merely reads from a file and displays the info on the screen.
After copying the code from UNIX to NT it doesn't work.
This is a snippet of the script I am running.
-----------------------------------------------
-----------------------------------------------open(DAT,"$FileName"); @inFile=<DAT>; close(DAT); print "$#inFile"; print "@inFile";
After executing, the @inFile=<DAT> statement returns nothing and the $#inFile statement equals "-1".
$FileName points to a text file in the same directory as the script. There are no problems with opening or closing the file, just reading from it.
Can anyone help. It's probably very simple but it's got me stumped.
Cheers,
Scotty.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading from a file on a NT server
by vek (Prior) on Jan 30, 2003 at 15:15 UTC | |
|
Re: Reading from a file on a NT server
by perrin (Chancellor) on Jan 30, 2003 at 15:18 UTC | |
by bwjen1 (Initiate) on Jan 30, 2003 at 15:40 UTC | |
by Fletch (Bishop) on Jan 30, 2003 at 16:14 UTC | |
by Jenda (Abbot) on Jan 30, 2003 at 16:16 UTC |