On Sep 9, Paul Kraus said: >I have one question though using the while ( <$fh> ) >Works great. Is there a reason I would want to do while (read ( $fh, >$buffer, $buffer_size)
If you want to read the optimal number of bytes at a time. In a simple application, there's really no reason to do one over the other. If you don't like read(), though, you can always say: $/ = \16_384; while (<FH>) { # $_ is a 16,384 byte chunk } Setting $/ to a reference to an integer means that <FH> reads that many bytes at a time. (Usually, $/ is a string that tells Perl when to stop reading a "line" -- its default value is "\n".) -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]