Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl Monk, Perl Meditation
 
PerlMonks  

Re: @_0 vs. $_0

by merlyn (Sage)
on Nov 22, 2000 at 13:46 UTC ( [id://42926]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to @_0 vs. $_0

Yes, almost always, @foo[$bar] is broken, and should have been written $foo[$bar]. In many cases, this is an undetectable mistake, as in:
$total = @a[3] + @a[4]; # works print @a[5]; # works
But is fatal when we use it in a place where it makes a difference:
@a[3] = <STDIN>; # read one line? NOPE!
Hence the very right warning.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://42926]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.