String equality (eq) will work much better.
In reply to Re: Perl and Lib::XML usage by chromatic in thread Perl and Lib::XML usage by pineapples