go ahead... be a heretic | |
PerlMonks |
Re: Inappropriate I/O control operation (Updated)by 1nickt (Canon) |
on Sep 26, 2017 at 15:25 UTC ( [id://1200119]=note: print w/replies, xml ) | Need Help?? |
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. Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|