You could use something like this:

<% $ads eq 'is_web' ? 'Web Only' : $ads eq 'is_print' ? 'Print' : 'Web and
Print' %>

I wouldn't necessarily call it cleaner.  That can get pretty hairy if you
do more than a few test cases.  I prefer the if/else blocks.

Brad

> Hello everyone,
>
> I know there's a cleaner way to do this.  All I want to do is print a
> word, but have more than one test case.  I'd like to do it in the <%
> %> print operator, but haven't been able to figure that out.
>
> % if ( $ads = 'is_web' ) {
> Web Only
> % } elsif ( $ads = 'is_print' ) {
> Print
> % } else {
> Web and Print
> % }
>
> I'm printing this in a <td> tag so it make the code a little messy.
>
> Any suggestions are greatly appreciated,
> Kevin
> --
> Kevin Old
> [EMAIL PROTECTED]


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to