title: Can't locate XML/Writer.pm in @INC
body: <p>can someone help me to exclude below the error.</p>
  
  <p>Thanks in advance</p>
  
  <p>Can't locate XML/Writer.pm in @INC (@INC contains: /home/svceln/usr/lib/perl5/site_perl/5.16.2/x86_64-linux /home/svceln/usr/lib/perl5/site_perl/5.16.2 /home/svceln/usr/lib/perl5/5.16.2/x86_64-linux /home/svceln/usr/lib/perl5/5.16.2 .) at /opt/apps/tomcat_scripts/allocate_ports.pl line 7.
  BEGIN failed--compilation aborted at /opt/apps/tomcat_scripts/allocate_ports.pl line 7.
  Error in allocating ports, server.xml cannot run`</p>
  
  <p>The script i am using</p>
  
  <pre><code>#!/home/svceln/usr/bin/perl -w
  # allocate_ports.pl
  
  # allocate ports, create port_config.xml and write to stdout
  
  use strict;
  use XML::Writer;
  use IO::File;enter code here
  use File::Basename;
  
  my ($increment) = 0;
  my ($execDir) = dirname($0);
  
  $#ARGV eq 0 or die "Usage: allocate_ports.pl server_name\n";
  
  my ($port_read) = new IO::File ("$execDir/port_increment.txt");
  if (defined $port_read) {
    while (&lt;$port_read&gt;) {
      chomp;
      $increment = $_;
    }
    $port_read-&gt;close() or die "Can't close port_increment.txt: $!";
  } else {
    $increment = 0;
  }
  </code></pre>