Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my @records; { local $/ = /====/; #obviously this won't work... open FILE1, "$ARGV[0]" or die "Cannot open data file.\n$!"; while ( my $record = <FILE1> ) { my @chunks = split /\n/, $record; push @records, [@chunks]; } close FILE1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Record separator question
by Limbic~Region (Chancellor) on Jan 20, 2004 at 23:40 UTC | |
|
Re: Record separator question
by Zaxo (Archbishop) on Jan 20, 2004 at 23:50 UTC | |
|
Re: Record separator question
by Roger (Parson) on Jan 21, 2004 at 00:18 UTC | |
|
Re: Record separator question
by Cody Pendant (Prior) on Jan 20, 2004 at 23:56 UTC | |
|
Re: Record separator question
by graff (Chancellor) on Jan 21, 2004 at 02:43 UTC | |
|
Re: Record separator question
by duff (Parson) on Jan 21, 2004 at 03:58 UTC |