Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 examining the Monastery: (11)
As of 2014-09-16 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (33 votes), past polls