Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: @_ still mystifies me

by Cody Pendant (Prior)
on Jun 03, 2002 at 03:23 UTC ( #171120=note: print w/ replies, xml ) Need Help??


in reply to @_ still mystifies me

This works for me:

unless(@lexlist){@lexlist = sort keys %lexicon};

I think what you're missing is that you can't use "or" in that way, not what happens to @_.

UPDATE:

Here's my test to prove that @_ is not always evaluated to true:

&lex(); &lex(1,2,3); sub lex{ @lexlist = @_; if(@lexlist){ print "I got the lexlist, here it is: @lexlist \n" }else { print "where's the list?\n"; } }

Which answers your question. --

($_='jjjuuusssttt annootthheer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;


Comment on Re: @_ still mystifies me
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-07-11 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (217 votes), past polls