Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use warnings; use strict; my @array = qw( testme ); my $string = qq! first ! . ( grep /testme/, @array ? qq! yes ! : qq! no ! ) . qq! end !; print $string;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Grep-Ternary Operator Question
by ikegami (Patriarch) on Oct 05, 2010 at 18:04 UTC | |
by ww (Archbishop) on Oct 05, 2010 at 21:12 UTC | |
by ikegami (Patriarch) on Oct 05, 2010 at 21:31 UTC | |
by ww (Archbishop) on Oct 05, 2010 at 23:32 UTC |