Re: Different way of getting Standard input



On 31 Dec, 08:45, prabu.ayyap...@xxxxxxxxx (Prabu Ayyappan) wrote:
Hi All,

What is the difference in Accepting the following form of standard input?

1) $a = <STDIN>;
2) $b = <stdin>;
3) $c = <>;

Now check,
print $a $b $c;

What is actually happening?
Will this be written to some standard input file?
If so In windows where this will be written?

Thanks,
Prabu.M.A

      ___________________________________________________________________________­_________
Never miss a thing.  Make Yahoo your home page.http://www.yahoo.com/r/hs

3 diffrent way of writing the same thing, a lot of time PERL have more
than one way of doing things.
I have learn to write
<STDIN> upper letters to show it is a stream

You have 3 standard streams (without open anything)
a. STDIN (Defaults reads from keybord
b. STDOUT (Default write to the screen)
c. STDERR (Defaults write to the screen to)

STDOUT and STDERR have a mening that you allways write errormessage to
STDERR and can
redirect it to eg. a errorfile.

IF you haven't redirect STDIN it reads from KEYBORD to MEMORY and
don't give you any file
that you can use, if you like to save data open a file and write alla
data to it

// Anders

.



Relevant Pages

  • Re: an editable history for every stdin
    ... >& recall front end to any interactive program that accepts commands ... that accepts commands from the standard input"? ... If it is to be part of /every/ stdin process, I see great problems with it. ...
    (comp.unix.shell)
  • Re: How to read data from a bash pipe -- thank you
    ... Ioannis Vranos schrieb: ... pipes, it knows about standard input, accessible via std::cin. ... "Usually the keyboard" is a little imprecise. ... the very least there's a line buffer between the keyboard and stdin. ...
    (comp.lang.cpp)
  • Re: safe scanf( ) or gets
    ... >> The real answer is that stdin is seldom used in real programs. ... programs which read from standard input and write to ... > prefer non-GUI programs to GUI programs. ...
    (comp.lang.c)
  • Re: acctcom, at, OSR507
    ... > `acctcom` makes a guess about whether you mean to process stdin or the ... it reads the standard input. ... > accounting records. ...
    (comp.unix.sco.misc)
  • Re: About stdin & stdout
    ... Any C or Unix programming book will talk about stdin and stdout. ... If you're really after the Win32 Standard Input and Standard ... you might try looking up GetStdHandleon MSDN or in the VC++ help ...
    (microsoft.public.vc.language)