Rob Dixon wrote:
> 
> This will try to read from the <stdout> filehandle and try to
> print each line to the filehandle specified by $program. Note
> that <stdout> is case=sensitive, and isn't the same as <STDOUT>,
> but either way it's not open for input and the read will fail.

Perl originally used the lower case filehandles stdin, stdout and stderr and they
are still supported in current versions although they will produce warnings.

$ perl -le'
print STDOUT "test STDOUT";
print stdout "test stdout";
print STDERR "test STDERR";
print stderr "test stderr";
print NONE "test NONE";
print none "test none";
'
test STDOUT
test stdout
test STDERR
test stderr

$ perl -Mwarnings -Mstrict -le'
print STDOUT "test STDOUT";
print stdout "test stdout";
print STDERR "test STDERR";
print stderr "test stderr";
print NONE "test NONE";
print none "test none";
'
Unquoted string "stdout" may clash with future reserved word at -e line 3.
Unquoted string "stderr" may clash with future reserved word at -e line 5.
Unquoted string "none" may clash with future reserved word at -e line 7.
Name "main::NONE" used only once: possible typo at -e line 6.
Name "main::none" used only once: possible typo at -e line 7.
test STDOUT
test stdout
test STDERR
test stderr
Filehandle main::NONE never opened at -e line 6.
Filehandle main::none never opened at -e line 7.



John
-- 
use Perl;
program
fulfillment

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

Reply via email to