786 if(defined $found) { 787 return 'Waiting' if $found eq 'W' and $priority == 0; 788 return 'Processing' if $found eq 'P'; 789 return 'Finished' if $found eq 'F'; 790 } 791 792 return 'Reserved' if defined $priority && $priority > 0; 793 794 return ''; # empty string here will remove need for checking undef, or less log lines It seems that we should deal with $found="T" here.