#!/usr/bin/env perl -w $vt="foo.txt"; open(INFILE, $vt) or die "The file $vt could not be found.\n"; while(){ $vt=$_; chomp($vt); if (/^OBS ASH CLOUD/) {$in=1;} elsif (/^\n/) {$in=0;} next if ! $in; @array=split(/ /,$vt); print "@array"; #print "$vt\n"; }