in reply to Searching for a specific pattern.

If you're looking for EXACTLY "LX", then just use 'eq':
if( $type eq 'LX' ) {

Replies are listed 'Best First'.
Re^2: Searching for a specific pattern.
by Anonymous Monk on Jun 18, 2010 at 19:20 UTC
    I can't use that, using XML::XPATH, I need to use regular expression for this.

      I don't see the relation between XPaths and regular expressions, but /^LX\z/ checks for exactly "LX".

      ( An XPath that checks the value of an attribute would look like /foo/bar[@type="LX"] )