SPUG: new member (and learner) w/ ONE quick syntax question

David Dyck dcd at tc.fluke.com
Mon Jun 24 14:31:28 CDT 2002



Welcome Stephen

Try
  perldoc -f do

$ perl -le 'print 1 ? do { print "true" ; 42 } : 0'
true
42


On Mon, 24 Jun 2002 at 12:07 -0700, Baker, Stephen M <stephen.m.baker at intel...:

> 	when using the ternary operator ?, is the syntax:
>
> 	expression ? if_true : if_false;
>
> 	possible to modify so that if_true or if_false are compound
> expressions??


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list