I am trying to figure out why that error is thrown here. Shouldn't it just print 0 provided something wrong happens inside the try block and print 10 otherwise ?
#!/usr/bin/perl
use 5.006;
use strict;
use warnings;
use Try::Tiny;
my $test = 0;
try{
$test = 10;
my $s = $test /2;
}
catch{
print $_;
}
print $test;