Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2015-11-28 13:54 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (742 votes), past polls