The difference is that Perl reads the entire file into memory when you do a "@file = <FILE>", but it only reads one line at a time if you do a "while(<FILE>)". The difference definitely becomes clear if you try to do that with a 180MB file on a machine with 128MB RAM.
-----Original Message----- From: Pablo Fischer [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 8:43 AM To: [EMAIL PROTECTED] Subject: [New Question] Large file line by line Hi! Reading all these message about reading a 'big' file (I know that 180MB its not a big file), but what's the difference from reading like this: @file = <FILE>; foreach (@file) { print $_; } and with a While? Thanks!! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]