Re: Simple doublt of $_ and print;

2003-06-24 Thread Sudarshan Raghavan
Chris San wrote: It is supose this code prints the first line of file text.txt (which is not empty), but it doesn't print anything. $file = "text.txt"; open (file); ; The above statement does not store the result in $_, this is special only inside a while statement while () is equivalent t

RE: Simple doublt of $_ and print;

2003-06-24 Thread Tim Johnson
From: Chris San [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:25 PM To: [EMAIL PROTECTED] Subject: Simple doublt of $_ and print; It is supose this code prints the first line of file text.txt (which is not empty), but it doesn't print anything. $file = "text.txt"; open (fil

Simple doublt of $_ and print;

2003-06-24 Thread Chris San
It is supose this code prints the first line of file text.txt (which is not empty), but it doesn't print anything. $file = "text.txt"; open (file); ; print; close (file); I understood that ; gets a line (the first in this case) and, in this case, it puts the line in $_ . Also, print; (witho