in reply to testing an if statement in a string
my @field = (0,0,0,0,0,0,'PM',0,'CAVENDI'); my $cond = q(($field[6] eq 'PM' && $field[8] eq 'CAVENDI')); my $ret; eval "\$ret = $cond"; warn $@ if $@; print $ret;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: testing an if statement in a string
by LanX (Saint) on Oct 31, 2013 at 15:43 UTC | |
Re^2: testing an if statement in a string
by brcjacks (Initiate) on Oct 31, 2013 at 15:03 UTC | |
by AnomalousMonk (Archbishop) on Oct 31, 2013 at 23:14 UTC |
In Section
Seekers of Perl Wisdom