> > > my $i=0;
> > > while ()
> > > {
> > > @fields = unpack("A10A10A7", $_);
> >
> > my @fields = unpack 'A10A10A7', $_;
> >
> >
> > > $records{$i} = {
> >
> > Why not just use an array?
>
> different strokes for different strokes :)
Now that
> -Original Message-
> From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 2:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Parsing Fixed Length data
>
>
> Toby Stuart wrote:
> >
> > use strict;
> > use warnings;
Toby Stuart wrote:
>
> use strict;
> use warnings;
>
> my %records;
>
> my $surname;
> my $given_name;
> my $price;
You create these three variables because?
> my @fields;
You should declare this _inside_ the loop.
> my $i=0;
> while ()
> {
> @fields = unpack("A10A10A7", $_);
Kevin Old wrote:
>
> Hello all,
Hello,
> I have run into a situation that I've never faced before. I've always
> parsed delimited (comma, pipe, etc) data. Now I'm faced with parsing
> fixed-width data. That's fine and I understand how to do it and have
> even found a module for it (Parse::Fix
> -Original Message-
> From: Kevin Old [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 12:18 PM
> To: [EMAIL PROTECTED]
> Subject: Parsing Fixed Length data
>
>
> Hello all,
>
> I have run into a situation that I've never faced befo
Kevin Old wrote:
Hello all,
I have run into a situation that I've never faced before. I've always
parsed delimited (comma, pipe, etc) data. Now I'm faced with parsing
fixed-width data. That's fine and I understand how to do it and have
even found a module for it (Parse::FixedLength).
Say I ha
Hello all,
I have run into a situation that I've never faced before. I've always
parsed delimited (comma, pipe, etc) data. Now I'm faced with parsing
fixed-width data. That's fine and I understand how to do it and have
even found a module for it (Parse::FixedLength).
Say I have the following s