my @input = ; unless ($input[25] =~ /.*ITN.*ITE.*WAHEAD.*WBEHIND.*WLEFT.*WRIGHT.*STATUS.*/) { exit; } splice(@input,0,27); splice(@input,-3); # Get rid of unneeded stuff if ($ARGV[0] eq "-s" ) { &summary(@input) } elsif ($ARGV[0] eq "-h" ) { &help } elsif ($ARGV[0] eq "-e" ) { &error(@input) }