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

Re: @array[1] is valid??

by CountZero (Bishop)
on Aug 04, 2003 at 19:04 UTC ( [id://280766]=note: print w/replies, xml ) Need Help??


in reply to @array[1] is valid??

$foo[1] returns you a scalar and @foo[1] returns you a one element list.

If you do it in a context which is sensible to being in scalar or list context, it might bite you, hence the message given by warnings.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found