Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 scrutinizing the Monastery: (7)
As of 2014-08-23 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls