Re: Seek positioning

2006-08-14 Thread Beginner
On 14 Aug 2006 at 3:51, John W. Krahn wrote: One last question (honest). > > What is "s!." in line 12, "next unless s!" > > s/// is the substitution operator. Why are you substituing here? Isn't a match good enough or is it necessary for some other reason? > > Here the output I get: > >

Re: Seek positioning

2006-08-14 Thread John W. Krahn
Beginner wrote: > On 11 Aug 2006 at 14:45, John W. Krahn wrote: >> >>use strict; >>use warnings; >>use XML::Simple; >>use Data::Dumper; >> >>my $file = 'test2.tif'; >> >>open my $FH, '<:raw', $file or die "Can't open $file: $!\n"; >> >>my $data; >>while ( <$FH> ) { >>next unless s!.*? > It is

Re: Seek positioning

2006-08-14 Thread Beginner
On 11 Aug 2006 at 14:45, John W. Krahn wrote: > Beginner wrote: > > I would be interested to know who I can improve this, or what a real > > programmer would do differently. Any tips are much appreciated. > > Okey doke! > > What I have so far = > > > > use strict; > >

Re: Seek positioning

2006-08-11 Thread John W. Krahn
Beginner wrote: > > I had just found tell (honest) in the opentut. You are of course > tight I have to step back a couple of bytes to get to the beginning > of the string I want but WHOOPIE it works. > > I can quickly retrieve all the XML/XMP from an image file (similar > to, but no where nea

Re: Seek positioning

2006-08-11 Thread Beginner
On 11 Aug 2006 at 9:28, Tom Phoenix wrote: > On 8/11/06, Beginner <[EMAIL PROTECTED]> wrote: > > > 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? > > You pr

Re: Seek positioning

2006-08-11 Thread Tom Phoenix
On 8/11/06, Beginner <[EMAIL PROTECTED]> wrote: 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? You probably want seek() and read(), instead of sysseek() and sysre