Hi, I am trying to open a binary file and find a string that begins:
<x:xapmeta xmlns:x='adobe:ns:meta/ I then want all the data, up to and including the end tag which looks like this: </x:xapmeta> It is easy enough to find the tag I am after use strict; use warnings; open(FH,$file) or die "Can't open $file: $!\n"; binmode(FH); while (<FH>) { if ($_ =~ "<x:xapmeta xmlns:x='adobe:ns:meta/") { print "Found $_\n"; last; } } close(FH); But once I have found my tag I would like to use sysseek and sysread to slurp up some data. Is there some way I can find out where my position in the file is once $_ has matched? Perhaps there is another way to do what I want but my experiments with sysread have worked and ben very fast. Any ideas? TIA. Dp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>