Is there some variable that will do for a file what $/ does for a
record?
What I mean is that in
$s=<STDIN>
the value of $s depends on the value of $/, but in
@arr=<STDIN>
I couldn't find a way to force the reading to stop when some character
is found.
Note that reading STDIN line by line and checking for a character won't
do the job, because somewhere in the program I need something like
open(F,"do-something|");
while(<F>){...}
and later
open(G,"do-something-else|")
while(<G>){...}
So, assuming that the program's standard input is redirected from some
file, I would need a way to divide the file into chunks, so that each
chunk would be treated as the whole STDIN each time @arr=<STDIN> or
open(F,"do-something|") appears in the program.
Any suggestion?
--
Jorge Almeida
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/