Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Comma's and blocks

by erroneousBollock (Curate)
on Oct 04, 2007 at 06:35 UTC ( [id://642579]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Comma's and blocks
in thread Comma's and blocks

print <STDOUT> , "Hello"; #runs
That doesn't do what you think.

<STDOUT> reads from the STDOUT filehandle (which won't do anything useful).

You can't put a comma between the file-handle and the printable content, the syntax is not short for any other syntax.

  print HANDLE expression

is the normal form.

  print expression

is parsed by perl to mean   print LATESTHANDLE expression

where LATESTHANDLE is the last handle given to select() (the default is STDOUT).

-David

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://642579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 19:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found