in reply to Re: Usage of File Handles
in thread Usage of File Handles
You already got suggestions on how to fix these errors:
Variable "$CONFIG" is not imported at ./Chapter9_Exer3 line 15. Variable "$OUTPUT" is not imported at ./Chapter9_Exer3 line 20. Global symbol "$CONFIG" requires explicit package name at ./Chapter9_E +xer3 line 15. Global symbol "$OUTPUT" requires explicit package name at ./Chapter9_E +xer3 line 20.
You open the filehandles CONFIG and OUTPUT, and then try to use the variables $CONFIG and $OUTPUT, these are two different things. You need to either change your open calls to use lexical variables, like I showed here, or remove the $ sigil, as pointed out by Your Mother and kcott.
syntax error at ./Chapter9_Exer3 line 8, near "'three_Freds.out':" Can't use global $0 in "my" at ./Chapter9_Exer3 line 12, near "Usage: +$0"
The first error was pointed out by poj: You have a typo in that line. The second error is just being caused by the parser getting confused after seeing the first error.
|
---|