in reply to Seperating Fixed Line Feed into Fields
Outputs:#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $rcount = 1; while (<DATA>) { my $string = $_; next if $rcount++ < 8; my @fields = unpack ('A34 A30 A40', $string); print Dumper(@fields), "\n"; } __DATA__ Ignore Me Line 1 Ignore Me Line 2 Ignore Me Line 3 Ignore Me Line 4 Ignore Me Line 5 Ignore Me Line 6 Ignore Me Line 7 This is a very long sentence which should illustrate the unpacking fun +ctionality in accordance to what you require.
For writing excel spreadsheets, Spreadsheet::WriteExcel does the trick for me.$VAR1 = 'This is a very long sentence which'; $VAR2 = ' should illustrate the unpacki'; $VAR3 = 'ng functionality in accordance to what y';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Seperating Fixed Line Feed into Fields
by drodinthe559 (Monk) on Jun 10, 2009 at 20:38 UTC | |
by Transient (Hermit) on Jun 10, 2009 at 20:54 UTC | |
by drodinthe559 (Monk) on Jun 10, 2009 at 21:01 UTC | |
by Transient (Hermit) on Jun 11, 2009 at 13:47 UTC |