maddfisherman has asked for the wisdom of the Perl Monks concerning the following question:
would this result in an array like this:file data stuff****more stuff#### end file data code local $/ = "****" while <FILE> { chomp $_ my @array = (push, $_) $/= "####"}
or would the <> operator reset and give this result:@array = ("stuff", "morestuff")
or can you not do this at all and it would give an error message.@array = ("stuff", "stuff***more\nstuff")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: a few basic questions
by dragonchild (Archbishop) on Aug 23, 2001 at 20:13 UTC | |
|
Re: a few basic questions
by maverick (Curate) on Aug 23, 2001 at 20:14 UTC | |
|
Re: a few basic questions
by Hofmator (Curate) on Aug 23, 2001 at 20:14 UTC | |
|
Re: a few basic questions
by ozone (Friar) on Aug 23, 2001 at 20:14 UTC | |
|
Re: a few basic questions
by IraTarball (Monk) on Aug 23, 2001 at 20:41 UTC | |
|
Re: one line each
by cLive ;-) (Prior) on Aug 24, 2001 at 04:39 UTC | |
|
??? how to print only one line
by maddfisherman (Sexton) on Aug 23, 2001 at 20:24 UTC | |
by IraTarball (Monk) on Aug 23, 2001 at 20:56 UTC | |
by CheeseLord (Deacon) on Aug 23, 2001 at 22:21 UTC |