I kinda cheated.
open(FH, "<". $file) or die print "Cannot read $file";
local $/ = undef;
my $seek = 0;
while (<FH>) {
while (/^(START(.*)^END)/smg) {
if (!$seek){ $seek= (pos) - length $1;}
}
}
$seek will eventually get the number which represents the number of
charaters read.
Then I got the file pos by doing this
open(FH, "<". $file) or die print "Cannot read $file";
my $header = '';
while (<FH>) {
$header .= $_;
if (length($header) > $seek){
# file pos found here :)
}
}
close (FH);
If anyone can simplify this, please please feel free to let me know
Regards
Mark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]