http://www.perlmonks.org?node_id=952501


in reply to Segmentation fault

Your copy of the @vals array may be copying an undefined value so perhaps you should check the values before setting them in the new array.
for my $i (0..$#vals){ $tot_mem[$i]=$vals[$i][1]?$vals[$i][1]:0; }
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."