use strict; use warnings; use Data::Dumper; # Add this line #### sub compile{ $all = $waybox->index('end'); print "$all\n"; for(my $num = 1;$num <= $all;$num++){ my $new = $num-1; my $sel = $waybox->get($new); print "TFD> sel <$sel>\n"; chomp ($sel); push(@latlong, $sel); } # liverpole -- Add a "Temporary for debug" print statement printf "TFD> latlong => %s\n", Dumper(\@latlong); $go = 1; } #### TFD> latlong => $VAR1 = [ '1 2', '3 4' ]; #### TFD> latlong => $VAR1 = [ '1 2', '3 4', '1 2', '3 4', '5 6' ]; #### if ( $go == 1 ){ # ... @latlong = ( ); } #### for(;;){ if( $progress == 0){last} # Pause for 1/10th of a second to be a good citizen select(undef, undef, undef, 0.1) }