12 data data data 12 data data data #### #! /usr/local/bin/perl -w use strict; open (FH, $ARGV[0]) or die "unable to open file"; open (OUTFILE, ">$ARGV[1]"); my $line; my @array; while () { $line = $_; # remove the newline characters from variable $line; chomp ($line); # @array = (); # remove a single whitespace from the start of lines foreach $line (@array) { $line =~ s/\s{1}//g; } @array = split (/\s+/, $line); }