#!/usr/bin/perl use strict; use Data::Dumper; my @r = (1..5); foreach (@r) { print "Start for $_\n"; my $splat = Splat->new(); #eval { $splat->splat() }; #if ($@) {next} if ($_ ==1) { print "Never getting this far\n" } } print "Nor this far\n"; package Splat; use Carp qw(croak); sub new { my $class = shift; my $self = {}; bless $self,$class; return $self; } sub splat { my $self = shift; croak "SPLAT!" if ! $self->{splat} } 1;