Update: OIC, you are using $! in your print statement. I missed that. Why? What are you trying to print?
As explained below by dave_the_m, you use $! after an error when it might hold a message about the error (if whatever encountered the error is nice enough to tell you). That's why I used it to check the return value of your file open call, which is where I assumed the error was coming from: it will tell you if you've made a typo in the path and the file does not exist, for example. In your case it is printing something unuseful because you're not using it the right way. What did you want to print there?
Original reply:
Try adding error checking and debugging to your program:
Also note the three argument form of open, which is safer.open(my $in, '<', $fn) or die "Died opening file: $fn error: $!";
Hope this helps!
In reply to Re: Inappropriate I/O control operation (Updated)
by 1nickt
in thread Inappropriate I/O control operation
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |