{{{vars}}} my $infile = ; print"Your input file is $infile\n\n"; open (INFILE, "<$infile")||die "no such file"; while () { @data = ; for ($x = 0; $x<=$#data; $x++){ chomp ($data[$x]); switch ($data[$x]){ # If start of section, increment array by 3 to skip header # case /^Begin Targets/ { $x += 3; } case /^0 / { # do not want last; } case /^1 / { @line = split(/ /,$data[$x]); # Get data out last; } case /^2 / { @line = split(/ /,$data[$x]); # Get data out last; } case /^3 / { @line = split(/ /,$data[$x]); # Get data out last; } # end case3 } # end switch } # end for } #end #### $DistX[$x] = $line[2]; $DistY[$x] = $line[3];