June 2005
Beginner
480 pages
10h 31m
English
| Q1: | My open statement keeps failing, and I'm not sure why. What's wrong? |
| A1: | First, check the syntax of the open statement. Make sure you're opening the right filename. Print the name before the open if you need to be sure. If you intend to write to the file, make sure you put a > in front of the filename; you need to. Most importantly, did you check the exit status of open by using open() || die "$!"; syntax? The die message might be very important in helping you find your mistake. |
| Q2: | I'm writing to the file, but nothing seems to go into it. Where's my output going? |
| A2: | Are you sure that the filehandle opened properly? If you used the wrong filename, your data could be going to the wrong file. A common mistake is to open a file for writing ... |
Read now
Unlock full access