Note: Beware! Default reply-to is to the list.
concatenation binds more closely than ternary op and logical AND &&, so the
ternary is looking at the result of the concatenation (which evaluates to
true, see perlsyn manpage on 'Truth vs Falsehood') and not the match ,
whereas in the highlighted cases the match (between parens) is evaluated
first. See perlop manpage on how Perl looks at a statement.
The say function is expecting a list, so to get what you expect you need
say (( 'h e l l o' =~ /h e l l o/x )?'true':'false')
to get everything else to be evaluated and the result said
Otherwise I misunderstand the question... (first day back from holiday :-)
Za-pm mailing list
posts also archived on Mail Archive