title: troubleshooting "pseudo-hashes are deprecated"  while using xml module
body: <p>I am just learning how to use perl hashes and ran into this message in perl.  I am using <code>XML::Simple</code> to parse xml output and using <code>exists</code> to check on the hash keys.</p>
  
  <p><strong>Message:</strong>
  <code>Pseudo-hashes are deprecated at ./h2.pl line 53.
  Argument "\x{2f}\x{70}..." isn't numeric in exists at ./h2.pl line 53.
  Bad index while coercing array into hash at ./h2.pl line 53.</code></p>
  
  <p>I had the script <strong>working</strong> earlier with one test directory and then executed the script on another directory for testing when I got this message. How do I resolve/workaround this?</p>
  
  <p><strong>Code that the error references:</strong></p>
  
  <pre><code>use strict;
  use warnings;
  use XML::Simple;
  use Data::Dumper;
  
  #my $data = XMLin($xml);
  my $data = XMLin($xml, ForceArray =&gt; [qw (file) ]);
  my $size=0;
  
  if (exists $data-&gt;{class}
         and $data-&gt;{class}=~ /FileNotFound/) {
          print "The directory: $Path does not exist\n";
          exit;
            } elsif (exists $data-&gt;{file}-&gt;{path}
                        and $data-&gt;{file}-&gt;{path} =~/test-out-00/) {
                      $size=$data-&gt;{file}-&gt;{size};
                         if ($size &lt; 1024000) {
                            print "FILE SIZE:$size BYTES\n";
                            exit;
                         }
            } else {
              exit;
  }
  
  print Dumper( $data );
  </code></pre>
  
  <p>Working test case, data structure looks like this:</p>
  
  <pre><code>$VAR1 = {
                'recursive' =&gt; 'no',
                'version' =&gt; '0.20.202.1.1101050227',
                'time' =&gt; '2011-09-30T02:49:39+0000',
                'filter' =&gt; '.*',
                'file' =&gt; {
                          'owner' =&gt; 'test_act',
                          'replication' =&gt; '3',
                          'blocksize' =&gt; '134217728',
                          'permission' =&gt; '-rw-------',
                          'path' =&gt; '/source/feeds/customer/test/test-out-00',
                          'modified' =&gt; '2011-09-30T02:48:41+0000',
                          'size' =&gt; '135860644',
                          'group' =&gt; '',
                          'accesstime' =&gt; '2011-09-30T02:48:41+0000'
                       'modified' =&gt; '2011-09-30T02:48:41+0000'
                     },
        'exclude' =&gt; ''
      };
  recursive:no
  version:0.20.202.1.1101050227
  time:2011-10-01T07:06:16+0000
  filter:.*
  file:HASH(0x84c83ec)
  path:/source/feeds/customer/test
  directory:HASH(0x84c75d8)
  exclude:
  </code></pre>
  
  <p><strong>Data structure with seeing error:</strong></p>
  
  <pre><code>$VAR1 = {
            'recursive' =&gt; 'no',
            'version' =&gt; '0.20.202.1.1101050227',
            'time' =&gt; '2011-10-03T04:49:36+0000',
            'filter' =&gt; '.*',
            'file' =&gt; [
                      {
                        'owner' =&gt; 'test_act',
                        'replication' =&gt; '3',
                        'blocksize' =&gt; '134217728',
                        'permission' =&gt; '-rw-------',
                        'path' =&gt; '/source/feeds/customer/test/20110531/test-out-00',
                        'modified' =&gt; '2011-10-03T04:47:46+0000',
                        'size' =&gt; '121406618',
                        'group' =&gt; 'feeds',
                        'accesstime' =&gt; '2011-10-03T04:47:46+0000'
                      },
  </code></pre>
  
  <p>Test xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;listing time="2011-10-03T04:49:36+0000" recursive="no" path="/source/feeds/customer/test/20110531" exclude="" filter=".*" version="0.20.202.1.1101050227"&gt;&lt;directory path="/source/feeds/customer/test/20110531" modified="2011-10-03T04:48:19+0000" accesstime="1970-01-01T00:00:00+0000" permission="drwx------" owner="test_act" group="feeds"/&gt;&lt;file path="/source/feeds/customer/test/20110531/test-out-00" modified="2011-10-03T04:47:46+0000" accesstime="2011-10-03T04:47:46+0000" size="121406618" replication="3" blocksize="134217728" permission="-rw-------" owner="test_act" group="feeds"/&gt;&lt;file path="/source/feeds/customer/test/20110531/test-out-01" modified="2011-10-03T04:48:04+0000" accesstime="2011-10-03T04:48:04+0000" size="127528522" replication="3" blocksize="134217728" permission="-rw-------" owner="test_act" group="feeds"/&gt;&lt;file path="/source/feeds/customer/test/20110531/test-out-02" modified="2011-10-03T04:48:19+0000" accesstime="2011-10-03T04:48:19+0000" size="125452919" replication="3" blocksize="134217728" permission="-rw-------" owner="test_act" group="feeds"/&gt;&lt;/listing&gt;
  </code></pre>