in reply to Changing the input value

Hello battingboy, and welcome to the Monastery!

If we assume that:

then you can extract the x values like this:

#! perl use strict; use warnings; use Data::Dump; my $file = 'x.dat'; my $column = 3; my $separator = qr{\s+}; # split on whitespace my @values; open(my $fh, '<', $file) or die "Cannot open file '$file' for reading: $!"; while (my $line = <$fh>) { chomp $line; # remove the trailing newline my @cols = split $separator, $line; push @values, $cols[$column]; } close $fh or die "Cannot close file '$file': $!"; dd \@values;

And of course you will need to repeat this for the y values (which you specify are in a different file).

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,