Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Your favourite gory detail...

by Zaxo (Archbishop)
on Jun 21, 2004 at 05:33 UTC ( [id://368371]=note: print w/replies, xml ) Need Help??


in reply to Your favourite gory detail...

My favorite is a very general feature - the light-hearted way perl has with context. It is an annoyance to lovers of formalism that every perl builtin and function is free to return whatever it likes for the context it finds itself in. That is the essence of perl dwimmerie.

After you master the difference between list and scalar context, you get to enjoy string and numeric contexts for your values. You can savor the numification and stringification of undef.

Not only that, you get wantarray and use overload for '""', '0+' and 'bool', so you can play the game yourself!

Delicious!

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Your favourite gory detail...
by demerphq (Chancellor) on Jun 25, 2004 at 16:30 UTC

    Delicious!

    Agreed 100%. And just a little bit of extra effort in tailoring your subs to behave intelligently pays off in terms of usabily in a huge way.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-03-29 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found