On Wed, 5 Sep 2001, nafiseh saberi wrote:

> what are the meaninig in source code of perl:
> 1-$|=1  (in second line in perl  ???)

This turns on autoflushing of the currently selected filehandle, so you
don't have to explicitly flush an output buffer, it's done automatically
every time you use an outoput function like print or printf.  In many
cases, this is for STDOUT, which is line buffered, so things get printed
out properly.

> 2-what is the main meaning of undef ??

It makes a variable undefined -- the variable has no value and may cause
run time errors if you try to use it in a statement where a defined value
is required.

> 3-why in define associative array sometimes use %array(a=>d)
> and sometimes use%array('a'=>d)  ??/

They are more or less the same.  The => will automatically single quote
the string preceding it, which is the key value in the hash.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
"Not Hercules could have knock'd out his brains, for he had none."
                -- Shakespeare



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

Reply via email to