Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
part1 %%%%%% part2 %%%%%% part3 this is still part 3, even though we have a % in it somewhere the % must be on a newline, like so: %So that would have 3 "segments". I want to store this in an array. I think a good way to do this would be to use 'split' (if you can think of a better way, please tell me). I've tried (assume FILE is already open, etc):
But it only gets the first line. How would I code this properly? TIA@list = split /.+(%+)/s, <FILE>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: using split on a file
by h0mee (Acolyte) on Feb 15, 2000 at 00:52 UTC | |
|
Re: using split on a file
by Anonymous Monk on Feb 14, 2000 at 11:17 UTC | |
by Anonymous Monk on Feb 14, 2000 at 11:31 UTC | |
|
Re: using split on a file
by jamescohen (Initiate) on Feb 14, 2000 at 18:42 UTC | |
|
Re: using split on a file
by Anonymous Monk on Feb 15, 2000 at 11:43 UTC | |
|
Re: using split on a file
by Anonymous Monk on Feb 13, 2000 at 06:52 UTC | |
|
Re: using split on a file
by lolindrath (Scribe) on Jan 02, 2001 at 10:27 UTC | |
by eg (Friar) on Jan 02, 2001 at 14:39 UTC |