Thread Fehlerbehandlung (13 answers)
Opened by Schland-Meister at 2012-06-25 14:17

GwenDragon
 2012-06-25 14:32
#159358 #159358
User since
2005-01-17
14542 Artikel
Admin1
[Homepage]
user image
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

View full thread Fehlerbehandlung