use strict; use warnings; use Test::More; use Config; # Stop f77-linking causing spurious undefined symbols (alpha) $ENV{'PERL_DL_NONLAZY'}=0 if $Config{'osname'} eq "dec_osf"; require PGPLOT; diag <){ # Read data in 2 columns from file handle # and put in two perl arrays ($x[$i], $y[$i]) = split(' '); $i++; } # Plot points - note how perl arrays are passed PGPLOT::pgpoint($i,\@x,\@y,17); PGPLOT::pgend(); # Close plot pass; done_testing; __DATA__ 1 -4.5 2 -4 3 -3.2 4 -2.1 5 -1 6 0.3 7 1.2 8 2.4 9 2.9