Thread Fehlerbehandlung
(13 answers)
Opened by Schland-Meister at 2012-06-25 14:17
Benutze eval. ;)
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!/usr/bin/perl use strict; use diagnostics; use URI; my $failed = 0; eval ' my $uri = URI->new("-invalid-input-harhar-")->canonical; my $host = $uri->host; '; $failed = 1 if $@; print $failed; die Drachin, Gwendolyn
Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel |