Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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;

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 imbibing at the Monastery: (7)
As of 2016-06-25 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (326 votes). Check out past polls.