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;