in reply to Stripping page headers
Second approach, building a regex to strip out the data you do want is left as an exercise for the reader.#!/usr/bin/perl -w use strict; my ($REPFILE, $report); undef $/; # Allows whole file to be slurped open REPFILE, "sample.rep" or die "Can't open file $REPFILE: $!\n"; $report = <REPFILE>; # All file now in report variable # Only do this for reasonably sized # report files or buy some memory :) $report =~ s/^User Report//g; $report =~ s/^Other Header Stuff//g; print $report;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Stripping page headers
by Anonymous Monk on Sep 27, 2000 at 23:40 UTC | |
by Dermot (Scribe) on Sep 27, 2000 at 23:53 UTC | |
by Anonymous Monk on Sep 28, 2000 at 00:55 UTC | |
by Anonymous Monk on Sep 28, 2000 at 00:53 UTC | |
by Anonymous Monk on Sep 28, 2000 at 01:04 UTC | |
by Dermot (Scribe) on Sep 28, 2000 at 01:54 UTC | |
by Anonymous Monk on Sep 29, 2000 at 04:31 UTC |