Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

torf or Mindy?

by metaperl (Curate)
on Apr 29, 2009 at 15:11 UTC ( [id://760901]=CUFP: print w/replies, xml ) Need Help??

Well, oftentimes when pulling data from somewhere, you will need to humanize booleans... not everyone is a Mork from Ork!
sub torf { my($val, $true_word, $false_word)=@_; $true_word ||= 'Yes' ; $false_word ||= 'No' ; $val ? $true_word : $false_word ; }

Replies are listed 'Best First'.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found