djaesone has asked for the wisdom of the Perl Monks concerning the following question:
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax Error
by idsfa (Vicar) on Mar 19, 2006 at 06:08 UTC | |
by djaesone (Initiate) on Mar 19, 2006 at 06:19 UTC | |
by Fletch (Bishop) on Mar 19, 2006 at 06:44 UTC | |
|
Re: Syntax Error
by jonadab (Parson) on Mar 19, 2006 at 10:45 UTC | |
|
Re: Syntax Error
by Viko (Acolyte) on Mar 19, 2006 at 15:34 UTC |