1nickt has asked for the wisdom of the Perl Monks concerning the following question:
Maybe I ate too much turkey yesterday, but ... using perl 5.40.1, why does this code work:
while this code gets an error:$ perl -MTry::Tiny -e 'try {1/0};' $
Thanks.$ perl -MTry::Tiny -E 'try {1/0};' syntax error at -e line 1, near "};" Execution of -e aborted due to compilation errors. $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Try::Tiny and -E
by haukex (Archbishop) on Dec 26, 2025 at 12:56 UTC | |
by 1nickt (Canon) on Dec 26, 2025 at 13:35 UTC | |
|
Re: Try::Tiny and -E
by LanX (Saint) on Dec 26, 2025 at 13:34 UTC | |
by 1nickt (Canon) on Dec 26, 2025 at 13:54 UTC | |
by LanX (Saint) on Dec 26, 2025 at 14:49 UTC | |
by LanX (Saint) on Dec 26, 2025 at 18:25 UTC |