Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by broquaint (Abbot)
on Aug 21, 2003 at 15:39 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found