#!/usr/bin/perl -w use strict; my (@x,@y1,@y2,@y3,@y4); while(<>) { # reads a line into $_ chomp; # remove the newline from its end my @val = split; # with no parameters, split() splits $_ on whitespace push @x, # push() to append to the end of @x shift @val; # shift pulls the first element out of an array push @y1, shift @val; push @y2, shift @val; push @y3, shift @val; push @y4, shift @val; }