in reply to initialization errors perl hash
If your input line ($line) is blank/empty, $page would be undef.
This would result in The warning message you get.
The fix is to check that you do get data - above line 8, add the line:
FYI - Line 17 refers to the input data line 17, which you have not shown in your post, probably because it was not visible - just a blank line.next unless $page;
"XML is like violence: if it doesn't solve your problem, use more."
|
|---|