|Welcome to the Monastery|
Re: File Test operators, option -Tby zork42 (Monk)
|on Sep 12, 2013 at 02:53 UTC||Need Help??|
Do you have the following near the start of your script?
The 2 "essentials" catch lots of errors and will save you lots of time. You should always use them!
If you'd had them in your script you'd have got this error message:
-T on closed filehandle $fh at script_name.pl line 2.
The 2 "optionals" can be very useful.
eg use autodie; would have given you this error message:
Can't open 'input2.txt' for reading: 'No such file or directory' at script_name.pl line 1