in reply to Re: string manipulation question
in thread string manipulation question

of course you could write
my $str = "a load of constant stuff..." . (defined($option) && "optional bit in the middle ") . "loads more stuff";

Replies are listed 'Best First'.
Re: Re: Re: string manipulation question
by Anonymous Monk on May 18, 2001 at 19:10 UTC
    !! does wonders too.
    my $str = "a load of constant stuff..." . (!!$option && "optional bit in the middle ") . "loads more stuff";
      Aaah! I didn't know that trick. It's been said before and I'll say it again: You learn something new every day on PerlMonks.org. :)