On Monday, June 3, 2002, at 10:45 AM, bob ackerman wrote:
>
> 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
>>
; From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 03, 2002 1:38 PM
> To: bob ackerman
> Cc: [EMAIL PROTECTED]
> Subject: Re: Conditional Operator && STDIN
>
>
> On Jun 3, bob ackerman said:
>
> >> @ARGV = "< $filen
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 w
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 y
On Monday, June 3, 2002, at 09:27 AM, Jeff 'japhy' Pinyan wrote:
> On Jun 3, Balint, Jess said:
>
>> Hello all. I am working on my script, and I would like to be able to use
>> STDIN as a filehandle input unless a filename is specified. I have used
>> the
>> getopt for the filename, let's say
On Jun 3, Balint, Jess said:
>Hello all. I am working on my script, and I would like to be able to use
>STDIN as a filehandle input unless a filename is specified. I have used the
>getopt for the filename, let's say $opt_f.
I would use the magic of @ARGV and <>, and do this:
@ARGV = "< $filen