in reply to Re^2: Case Statement
in thread Case Statement

Assuming /Time_Stamp/i really means /^Time_Stamp\z/i,

my @array = ...; my %dispatch = ( time_stamp => sub { @time = split (/-/, $array[1]); $date_submited = $time[0]; $time_submited = $time[1]; }, ... ); my $func = $dispatch{lc($array[0])}; if ($func) { $func->(); } else { ... }