On Tue, 9 Jul 2013 13:24:54 +0530
jitendra B <[email protected]> wrote:

> Can you please let me know the following snippset? why it is used for?
> 
> 
> select( STDERR );

Change the default file handle use by `print` and `say` to STDERR. The
default file handle is use when no file handle is specified. Example:

    print "Hello world\n";

This print will output to STDERR.

> $| = 1;

Set the auto-flush for the default file handle. Auto-flush means to
output everything that's in the file buffer after every `print` or
`say`.

> select( STDOUT );

Change the default file handle use by `print` and `say` to STDOUT. The
default file handle is use when no file handle is specified. Example:

    print "Hello world\n";

This print will output to STDOUT.

> $| = 1;

Set the auto-flush for the default file handle. Auto-flush means to
output everything that's in the file buffer after every `print` or
`say`.


-- 
Don't stop where the ink does.
        Shawn

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to