Superfox il Volpone has asked for the wisdom of the Perl Monks concerning the following question:
This fails with the error:my $current_directory = getcwd(); try { chdir($working_directory); } finally { chdir($current_directory); };
```syntax error at /script.pl line 56, near "} finally " Execution of /script.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: try/finally syntax
by ikegami (Patriarch) on Jun 23, 2024 at 15:21 UTC | |
|
Re: try/finally syntax
by Corion (Patriarch) on Jun 23, 2024 at 13:35 UTC | |
by ikegami (Patriarch) on Jun 23, 2024 at 15:25 UTC | |
|
Re: try/finally syntax
by eyepopslikeamosquito (Archbishop) on Jun 23, 2024 at 13:46 UTC | |
|
Re: try/finally syntax
by eyepopslikeamosquito (Archbishop) on Jun 24, 2024 at 05:01 UTC |