> > On Jan 7, 2004, at 2:20 PM, Dan Muey wrote: > > > > > Is that possible to do with one line? > > technically no, because you needed > my ($firstchoice, $use_second_choice_if_first_is_empty); > my $secondchoice = 's2';
Sorry, I figured we could assume they were declared earlier so as not to muck up the screen and it wouldn't really change the question or answer. > > then you can do > > my $guts = ($use_second_choice_if_first_is_empty)? $secondchoice : > $firstchoice || ''; > Nice. > > ciao > drieux > > --- > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>