- or download this
#!perl -w
use strict;use warnings;
...
sub Main {
Switch {print "hi\n";return;}
}
- or download this
hi
- or download this
#!perl -w
use strict;use warnings;
use Switch;
Switch {my $a=1};
- or download this
Can't locate object method "Switch" via package "1" (perhaps you forgo
+t to load "1"?) at switch.pl line 4.
- or download this
#!perl -w
use strict;use warnings;
use Switch;
Switch {my $a=1;return};
- or download this
Can't return outside a subroutine at switch.pl line 4.