in reply to Perl and Lib::XML usage

if ( $literal == 'Sequence' )

String equality (eq) will work much better.

Replies are listed 'Best First'.
Re^2: Perl and Lib::XML usage
by samarzone (Pilgrim) on Oct 26, 2010 at 11:50 UTC
    Just want to add a line. The expression if ( $literal == 'Sequence' ) will always return true if $literal can not be converted to a numeric value. Both the operands will be converted to 0 (due to '==' operator) and a warning will be given if use warnings is used.