| Server IP : 94.16.115.136 / Your IP : 216.73.217.106 Web Server : Apache/2.4.52 (Ubuntu) System : Linux rogerrabbit 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 User : bkillingseder ( 1001) PHP Version : 8.1.2-1ubuntu2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/liberror-perl/examples/next-in-loop/ |
Upload File : |
#!/usr/bin/perl
use strict;
use warnings;
use Error qw(:try);
use Scalar::Util qw(blessed);
use IO::Handle;
package MyError;
use base 'Error';
package SecondError;
use base 'Error';
package main;
autoflush STDOUT 1;
SHLOMIF_FOREACH:
foreach my $i (1 .. 100)
{
eval
{
if ($i % 10 == 0)
{
throw MyError;
}
};
my $E = $@;
if (blessed($E) && $E->isa('MyError'))
{
next SHLOMIF_FOREACH;
}
print "$i\n";
}