in reply to Re: XML::Simple Issues
in thread XML::Simple Issues

I tried to install apt-get install libxml-simple-perl after it installed i tried to run the code again. perl -we use XML::Simple; print $INC{'XML/Simple.pm'} and I get the error still below

syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors. Warning: unknown mime-type for "{XML/Simple.pm}" -- using "application +/octet-stream" Error: no such file "{XML/Simple.pm}"

Replies are listed 'Best First'.
Re^3: XML::Simple Issues
by Anonymous Monk on Dec 30, 2010 at 02:28 UTC
    $ perl -e use syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors.
    See perlrun

    Alternatively, make a file

    $ cat junk87.pl use XML::Simple; print $INC{'XML/Simple.pm'} $ perl junk87.pl C:/perl/site/5.10.1/lib/XML/Simple.pm

      When I run the perl script you gave me I get the message /etc/perl/XML/Simple.pm the first 20 lines of the file are as follows

      package LWP::Simple; use strict; use vars qw($ua %loop_check $FULL_LWP @EXPORT @EXPORT_OK $VERSION); require Exporter; @EXPORT = qw(get head getprint getstore mirror); @EXPORT_OK = qw($ua); # I really hate this. I was a bad idea to do it in the first place. # Wonder how to get rid of it??? (It even makes LWP::Simple 7% slower # for trivial tests) use HTTP::Status; push(@EXPORT, @HTTP::Status::EXPORT); $VERSION = "5.810"; $FULL_LWP++ if grep {lc($_) eq "http_proxy"} keys %ENV;

      I'm unable to remove the package LWP::Simple. however I was able to install the one you gave me, like I have tried to install XML::Simple many different times before and came up with the same error. When I pull up  perl -MCPAN -e shell and type in "r" to pull the list of all installed modules I can't find the LWP or the XML::Simple anywhere in the list after it was installed. So, I'm half temppted to just reinstall my OS as a whole and start fresh since I can't seem to find where it keeps pointing to this file or how it was even created.

      When I do a locate Simple.pm I come up with this

      /etc/perl/Simple.pm /etc/perl/XML/Simple.pm /root/.cpan/build/XML-Simple-2.18-6AUYLc/lib/XML/Simple.pm /root/XML-Simple-2.18/blib/lib/XML/Simple.pm /root/XML-Simple-2.18/lib/XML/Simple.pm /usr/share/perl/5.10.0/Filter/Simple.pm /usr/share/perl/5.10.0/Locale/Maketext/Simple.pm /usr/share/perl/5.10.0/Log/Message/Simple.pm /usr/share/perl/5.10.0/Pod/Simple.pm /usr/share/perl/5.10.0/Test/Simple.pm /usr/share/perl5/LWP/Simple.pm /usr/share/perl5/XML/Simple.pm

      I've checked all the files and the only one that's different is in the /usr/share/perl5/XML/Simple.pm