Try::Tiny-Question
- by sid_com
Why doesn't the subroutine with try/catch give me the same results as the eval-version does.
#!/usr/bin/env perl
use warnings; use strict;
use 5.012;
use Try::Tiny;
sub shell_command_1 {
my $command = shift;
my $timeout_alarm = shift;
my @array;
eval {
local $SIG{ALRM} = sub { die "timeout '$command'\n" };
alarm…