General discussion

Locked

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.

1 total post (Page 1 of 1)  
| 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.
Thanks.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Forums