Does nmap2nagios have: #!/usr/bin/perl at the top. It looks like bash is interpreting the script. Try: perl nmap2nagios.pl (rest of options) ...james On 10/26/07, Rogelio <scubacuda at gmail.com> wrote: > I'm trying to use nmap2nagios (a perl script) on CentOS, but when I > run it, I get the following error: > > (If this is offtopic for this list, please let me know) > > ./nmap2nagios.pl -v -r /tmp/nmap.xml -o /tmp/new.cfg > > ./nmap2nagios.pl: line 9: use: command not found > ./nmap2nagios.pl: line 10: use: command not found > ./nmap2nagios.pl: line 11: use: command not found > ./nmap2nagios.pl: line 14: use: command not found > ./nmap2nagios.pl: line 15: ::Dumper::Indent: command not found > ./nmap2nagios.pl: line 16: ::Dumper::Maxdepth: command not found > ./nmap2nagios.pl: line 18: use: command not found > ./nmap2nagios.pl: line 19: use: command not found > ./nmap2nagios.pl: line 20: use: command not found > ./nmap2nagios.pl: line 22: use: command not found > ./nmap2nagios.pl: line 24: use: command not found > ./nmap2nagios.pl: line 26: my: command not found > ./nmap2nagios.pl: line 29: syntax error near unexpected token `=' > ./nmap2nagios.pl: line 29: ` $data_ref->{'Path'}) = fileparse($0);' > [root at localhost nmap2nagios-0.1.2]# > > When I type in "perl" before the command, I get this: > > [root at localhost nmap2nagios-0.1.2]# perl nmap2nagios.pl -v -r > /tmp/nmap.xml -o /tmp/new.cfg > > Can't locate XML/Simple.pm in @INC (@INC contains: > /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 > /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 > /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 > /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 > /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 > /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 > /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 > /usr/lib/perl5/vendor_perl .) at nmap2nagios.pl line 24. > BEGIN failed--compilation aborted at nmap2nagios.pl line 24. > [root at localhost nmap2nagios-0.1.2]# > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >