Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: @_ still mystifies me

by danger (Priest)
on Jun 01, 2002 at 17:49 UTC ( #170931=note: print w/ replies, xml ) Need Help??


in reply to Re: @_ still mystifies me
in thread @_ still mystifies me

I'm glad Ovid (++) mentioned the Deparse module, but be aware that different options can affect the output:

# no options: $ perl -MO=Deparse -e 'my @lexlist = @_ or sort keys %lexicon' sort keys %lexicon unless my(@lexlist) = @_; #--- # using -x7 (level 7 expands code into equivelant logical constructs # using &&, ?:, and do{}) -- (giving us back nearly the original) $ perl -MO=Deparse,-x7 -e 'my @lexlist = @_ or sort keys %lexicon' my(@lexlist) = @_ or sort keys %lexicon; #--- # however, using -p (to fully parenthesize) can often help expose # such problems as well: $ perl -MO=Deparse,-p -e 'my @lexlist = @_ or sort keys %lexicon' ((my(@lexlist) = @_) or sort(keys(%lexicon)));

It is sometimes useful to explore the output of Deparse with various options applied.


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-12-22 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (116 votes), past polls