I think something like:

if( $_[1] ) ? $m = $_[1] : $m ='text/plain';

might work.  Try looking up the perl 'trinary' operator.


"Dan Muey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
com...
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



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to