in reply to Opening files in NT
Your problem is that you are not checking for errors. Always use the following idiom to open files :
Not using "<" in the filename to specify a read operation also works, but it's better to be explicit in what you are doing.open FILE, "< $filename" or die "Couldn't open $filename : $!\n"; ... read file, do stuff ... close FILE;
Another thing to watch out for is specifying DOS filenames in Perl, as Perl will interpolate strings if they are double-quoted (you use " instead of '). Instead of using a backslash ("\") to separate directories, use a forward slash ("/"). This works under both, Unix and DOS and relieves you from having to quote your backslashes in your sourcecode.
|
|---|