-----Original Message----- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 8:02 AM To: Timothy Johnson; Michael Oldham; [EMAIL PROTECTED] Org Subject: RE: A loop to parse a large text file--output is empty!
>> From:"Timothy Johnson" <[EMAIL PROTECTED]> <snip> >> print OUT scalar(<PROBES>); >> >> As far as I can see, you're grabbing the next line, assigning it to $_ >> (maybe), and printing it out in scalar context. <snip> > > Nope, it's not changing $_. It just reads one line from PROBES and > prints it to OUT. (Erm ... reads from PROBES until it finds $/ and > then prints whatever it read and $\ .) > The scalar is necessary there since otherwise the print would provide > list context to <PROBES> and the statement would read and then write > the rest of the file, not just a line. Thank you for correcting me. Good to know. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>