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 | |
by ikegami (Patriarch) on Dec 27, 2025 at 20:23 UTC | |
by atcroft (Abbot) on Dec 30, 2025 at 01:42 UTC | |
by 1nickt (Canon) on Dec 29, 2025 at 11:31 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 | |
by CountZero (Bishop) on Jan 05, 2026 at 02:21 UTC | |
| |
by ikegami (Patriarch) on Dec 27, 2025 at 20:35 UTC | |
by LanX (Saint) on Dec 27, 2025 at 23:43 UTC | |
|