home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!cs.utexas.edu!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: nuther perl-idiom question..
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Sep1.232723.5911@news.eng.convex.com>
- Date: Tue, 1 Sep 1992 23:27:23 GMT
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <Btx90n.BMG@unx.sas.com>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 17
-
- From the keyboard of kent@manzi.unx.sas.com (Paul Kent):
- :in kornshell, one can say:
- :
- : x=${foo:-default}
- :
- :which assigns x the value of foo if foo is defined, and "default" otherwise...
-
- In Perl, one often writes:
-
- $x = $foo || "default";
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- Besides, it's good to force C programmers to use the toolbox occasionally. :-)
- --Larry Wall in <1991May31.181659.28817@jpl-devvax.jpl.nasa.gov>
-