#!/usr/local/bin/perl -w use strict; while (<>) { next if !/^total/; my @fields = split /\s+/; my($day, $total) = @fields[3,4]; ## Now graph the values or do whatever you ## want with them. ... ## This will exit the loop after it's seen ## the first "total" line. If you don't want ## to do this (if, for example, you'll have ## several "total" lines, each of which you ## want to graph), take out this line. last; } #### % foo.pl