Hi - > -----Original Message----- > From: Dan Muey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 6:33 AM > To: [EMAIL PROTECTED] > Subject: single line condition statement with semicolon > > > Hello > > > What I want to do is assign the value of $_[1] to $m unless it's > empty then assign it 'text/plain' > This currently works but I want to do a one liner > I think you can do that with a colon but I can't seem to find the syntax > > $m = 'text/plain'; > $m = $_[1] unless(!$_[1]); > > Somehting like > > $m = $_[1] unless(!$_[1]) :$m = 'text/plain'; > > But I can get it right, any assistance would be much appreciated. > > Thanks > > Dan >
$m = $_[1] ? $_[1] : 'text/plain'; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]