my @points; @points[1 .. 96] = (undef) x 96; foreach my $line (@grid) { # lots and lots of other code here that I dont want to change. /^(\d{1,2})$/ and $points[$1] = 1; # this doesn't work for (my $i = 1; $i < @points; $i++) { $plot = plot_graph (\@temps, \@new); push @graph_links, $plot . ' '; } } my $graph_links = join ('', @graph_links); @graph_links = split (/\s+/, $graph_links); print qq(

Please click on a spot!

); print qq(

); print qq();