When I tried to execute it, I got the following error:
syntax error at file.pl line 26, near "{ else" syntax error at file.pl line 30, near "}" Execution of file.pl aborted due to compliation errors.
Lines 18-34 are:
I will say that I am new to Perl, but having gotten this directly from the book, I wasn't thinking I needed to be a master. After some initial research, I inserted use Diagnostics; at the top, but I got the same error.if ($res->is_success) {</br> my $fh = new FileHandle ">$filename"; if (defined $fh) { print $fh $res->content; $fh->close; } else { print STDERR "could not open file $filename: $!\n"; } { else } print STDERR $res->status_line, "\n"; } } } $station = 'mn'; for ($year = 00; $year <= 04; $year++) { my $filename = '200' . $year . $station . 'zip';
Any idea what this means? In the perldiag documentation, it just says that this message means the execution ended, but I kinda figured that much. If there's somewhere else I can go to do my own research, just point me in that direction, and I'll take it from there.
Thanks!
In reply to Syntax Error by djaesone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |