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
something like:

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
Za-pm@pm.org
http://mail.pm.org/mailman/listinfo/za-pm

posts also archived on Mail Archive
http://www.mail-archive.com/za-pm@pm.org/

Reply via email to