On Monday, June 3, 2002, at 10:37  AM, Jeff 'japhy' Pinyan wrote:

> On Jun 3, bob ackerman said:
>
>>>   @ARGV = "< $filename" if $opt_f;
>>
>> why '<' ? isn't '$filename' enough for get '<>' to open and read from 
>> that
>> file?
>
> I feel safer when I explicitly state the mode.  Unless you want the user
> to put 'foo |' as the filename (that is, the output of a pipe), then you
> should use the file mode in your program explicitly.

i didn't realize that the 'while(<>')' would respect modes. i thought it 
was only for input.
good to know.

> --
> Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
> ** Look for "Regular Expressions in Perl" published by Manning, in 2002 *
> *
> <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]

Reply via email to