/usr/bin/perl-Tw use strict; use Text::ParseWords; open(DATA,"basicdez.dat") || die "Cannot open datfile: $!\n"; my @data; my $i = 0; my $new_record=0; while () { chomp; last if /^"EOS"$/; if (/^PER\s*$/) { $new_record=1; } elsif ($new_record) { @data = "ewords('\s+', 0, $_); print "Name = $data[0]\n"; print "Color = $data[1]\n"; print "Date = $data[2]\n"; $new_record = 0; } }