#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my @binarray; while (<DATA>) { my ($x,$y)=split / +/; my $ax = [ (0) x 72 ]; my $ay = [ (0) x 72 ]; $ax->[int ($x+180) / 5] = 1; $ay->[int ($y+180) / 5] = 1; push @binarray, [$ax, $ay]; } print Dumper (\@binarray); __DATA__ -70.6 -27.5 -60.8 52.9 -123.0 -132.9 110.1 119.9 -62.4 -45.6
In reply to Re^2: Problems processing data for graph
by holli
in thread Problems processing data for graph
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |