Web Development

General discussion


Use double bar operator to set values

By MaryWeilage Editor ·
Set default values the easy way:

The April 8, Perl TechMail discusses the setting of default values. Have you used the || operator in Perl to set default values for variables in your applications? Share your technique with other members.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

good stuff

by billmac3 In reply to Use double bar operator t ...

Although I have been using the double bars for setting default values for awhile, I've never really thought of using series of them for multiple possibilities. Also the ||= was an operator I was not familiar with either. That will come in very handy.

Related Discussions

Related Forums