Error while running code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rudhra75
    New Member
    • Aug 2010
    • 3

    Error while running code

    Hi,

    I was trying to execute this code keeping the filename as readxl.pl and got the below error:
    Can't locate Spreadsheet/ParseExcel/Simple.pm in @inc<@inc contains C:/Perl/site/lib C:/Perl/lib.>at readxl.pl line1
    BEGIN failed-compilation aborted at readxl.pl

    I downloaded the Spreadsheet_Par seExcel_Simple_ 1_04.tar.gz assuming that this might be missing from the Perl library

    Could anyone help me out in finding the directory under which this file should be placed?

    Thanks!!
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    It doesn't need to be in any particular place. You could have it in your home dir.

    The real question you need to ask is "What do I need to do with this file to install the module?".

    The answer can be found at:

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      You will notice that I have moved your post to a new thread. The thread that you posted to was 2 years old. Even if you use code from an old post, please DO NOT post to it as the thread is then resurected and no longer pertains to the original user. Essentially, you hijacked an old thread.

      What OS are you on? That is something we would need to know. I would recommend you use the CPAN interface on Unix to install modules, that way you don't have to go through the hassle of building the modules by hand and also manually installing any dependencies. If you are on Windows, then you might want to look into Strawberry Perl as it contains the same CPAN interface as the Unix version of Perl.

      Either way, RonB is correct, the answer is you need to install the module properly.

      Regards,

      Jeff

      Comment

      • rudhra75
        New Member
        • Aug 2010
        • 3

        #4
        Hi,

        I am using Windows XP and my Perl Version is 5.8.9

        I have the following folders inside C:\Perl
        (bin, etc, eg , html , man , site and lib(which in turn has so many folders)

        I am not sure which one among the above should I have the extracted folder of Spreadsheet_Par seExcel_Simple_ 1_04.tar.gz .

        I am just a beginner to Perl and your help is really a great one.Thank You!!

        Best Regards,
        Rudhra

        Comment

        • RonB
          Recognized Expert Contributor
          • Jun 2009
          • 589

          #5
          Are you using Activestate Perl, or Strawberry Perl?, or cygwin?

          Comment

          • numberwhun
            Recognized Expert Moderator Specialist
            • May 2007
            • 3467

            #6
            I concur with RonB that we really need to know what version of Perl you are running (not just the version number).

            On another note though, I would HIGHLY recommend that you read one of the free Perl ebooks on the net. This one is quite good and will give you a good grounding.

            Regards,

            Jeff

            Comment

            • rudhra75
              New Member
              • Aug 2010
              • 3

              #7
              Hi Both,

              Thanks a lot for guiding me!!

              I am using ActiveState Perl and yesterday I downloaded Strawbery Perl 5.12.256 as Jeff recommended but I was searching for links which helps in starting with Strawberry perl scripting as there ws no sample scripts available in strawberry perl like we had in ActiveState Perl.

              Thanks for the nice links...I will go through them.

              Cheers,
              Rudhra

              Comment

              • RonB
                Recognized Expert Contributor
                • Jun 2009
                • 589

                #8
                If you want to use Strawberry perl, then you should uninstall ActiveState. Windows isn't as "smart" as *nix, so having 2 different perl ports can/will cause problems.

                ActiveState comes with the ppm (Perl Package Manager) utility, which makes installing (and removing) modules very easy.

                ActiveState can also use cpan to install modules just like Strawberry perl. To automate the setup to use cpan, you would use the ppm utility to install MinGW.

                After that, you would be able to use cpan just like Strawberry perl.

                If you're using Strawberry perl and want to use the ppm gui interface for installing modules, then simply use cpan to install the ppm module.

                Comment

                • numberwhun
                  Recognized Expert Moderator Specialist
                  • May 2007
                  • 3467

                  #9
                  Sorry, I wasn't trying to throw confusion into the mix, but we didn't know which version you were using. Regardless of which distribution of Perl you use, Perl is Perl. The only difference between the two is how you install modules, really.
                  I would recommend reading the books in one of the links above as that should get you going in Perl.

                  Comment

                  Working...