in reply to Re: Seperating Fixed Line Feed into Fields
in thread Seperating Fixed Line Feed into Fields

How would that unpack command look? Below is what I have so far.
push @array, unpack("A34", $string);

Replies are listed 'Best First'.
Re^3: Seperating Fixed Line Feed into Fields
by ikegami (Patriarch) on Jun 10, 2009 at 21:08 UTC
    my @fields = unpack('A34 A30 A40 ...', $string);
    or
    my @field_sizes = (34, 40, 40, ...); my $rec_format = join '', map "A$_", @field_sizes; my @fields = unpack($rec_format, $string);

    Then use $fields[0] instead of $FIELD01, $fields[1] instead of $FIELD02, etc.