On Tue, 3 Jun 2003 22:38:47 -0700 (PDT), [EMAIL PROTECTED]
(Saurabh Singhvi) wrote:

>well i was trying to understand the "regular
>expressions" in perl when i came across <STDIN> i
>tried my best but i havent been able to get the
>slightest idea on how the input thing works. The
>editor i use is DzSoft. And it shows something like
>"get" and something else below like script something
>with blank space. 
>
>Any  hopes 4 me?? :-(
>Well i hope for me anyways ;)
>Help please
>Thanks in advamce :)

All programs have 3 default input-output filehandles,
they are STDIN, STDOUT, and STDERR. For Standard
Input, Standard Output, and Standard Error.

They default to: 
STDIN -> keyboard input
STDOUT -> your screen
STDERR -> your screen

They are used so often, that alot of short-cuts have
evolved, so you don't always have to write them out.

Run this and watch what it does.

#!/usr/bin/perl
while(<>){print}

without the shortcuts, it would look like this:
while(<STDIN>){print STDOUT}




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to