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

Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}

by broquaint (Abbot)
on Aug 21, 2003 at 15:39 UTC ( #285498=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use constant MATCHES => join '|' => qw/ a list of words /;
    
    ...
    method result   - something complex here
    a regexp object - (?x-ism:\b (?: a|list|of|words ) \b)
    
  2. or download this
    print "it's a hash     - @{[ %hash ]}\n";
    
  3. or download this
    print "method result   - ${ \$obj->method }\n";
    
  4. or download this
    print "a regexp object - ", qr[\b (?: ${\MATCHES} ) \b]x, $/;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://285498]
Approved by ybiC
Front-paged by naChoZ
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2015-07-29 20:17 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 (268 votes), past polls