Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 examining the Monastery: (5)
As of 2015-07-04 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls