Simple doublt of $_ and print;

2003-06-25 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); file; print; close (file); I understood that file; gets a line (the first in this case) and, in this case, it puts the line in $_ . Also, print;

RE: Simple doublt of $_ and print;

2003-06-25 Thread Tim Johnson
] 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 (file); file; print; close (file); I understood

Re: Simple doublt of $_ and print;

2003-06-25 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); file; The above statement does not store the result in $_, this is special only inside a while statement while (file) is