Loading ...
Sorry, an error occurred while loading the content.

Re: [list_a] Re: [Clip] Ad hoc Perl Regexp Replacements

Expand Messages
  • Alec Burgess
    Sheri, Alan: As the closest to Perl experts I know - maybe you can help me out with something that is probably simple. How does the use statement
    Message 1 of 5 , Jan 18, 2003
    • 0 Attachment
      Sheri, Alan:

      As the closest to Perl "experts" I know - maybe you can help me out with something that is probably simple.
      How does the "use" statement (directive?) work.

      Specifically: I downloaded a perl utility which is supposed to convert "msg" files to "mbox" files (I want to import mail cached by Popfile into Zoe)

      This web-site for this utility: http://www.xs4all.nl/~mvz/software/msgconv.html says :
      >>This program is written in Perl and uses the modules OLE::Storage_Lite and part of MIME-Tools. OLE::Storage_Lite is used to parse the .MSG file (It's an OLE compound document). MIME-Tools is used to put the parts of the message together to create a MIME entity from it.<<
      OLE::Storage_Lite http://search.cpan.org/author/KWITKNR/OLE-Storage_Lite-0.10/
      MIME-Tools http://search.cpan.org/author/ERYQ/MIME-tools-5.411a/

      I d/l'd both of these (they came as filename.tar.gz) and extracted them to the folder where I had the msgconv.pl. Obviously there is something else I have to do because when I run it I get this error message:
      >>Can't locate OLE/Storage_Lite.pm in @INC (@INC contains: C:/Perl/Perl_5.8/lib C:/Perl/Perl_5.8/site/
      -notins\MsgConvert\msgconvert.pl line 43.
      BEGIN failed--compilation aborted at C:\Program Files\AmbPF-notins\MsgConvert\msgconvert.pl line 43.<<

      Lines 41-46 in msgconvert say:
      >>
      use strict;
      use Getopt::Long;
      use OLE::Storage_Lite;
      use MIME::Entity;
      use MIME::Parser;
      use Pod::Usage;<<

      the readme in OLE-storage_lite says
      >>INSTALLATION
      The module can be installed using the standard Perl procedure:

      perl Makefile.PL
      make
      make test
      make install # You may need to be root
      make clean # or make realclean

      Windows users without a working "make" can get nmake from:
      ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe

      <<

      Do either of you (or anyone) follow what I'm being asked to do? It seems to be in Greek ;-) to me.

      Regards ... Alec
      --

      ---- Original Message ----
      From: "Alan C." <acumming@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: Saturday, January 18, 2003 18:33
      Subject: [list_a] Re: [Clip] Ad hoc Perl Regexp Replacements

      > Hi Sheri,
      >
      >> It looks like some docs are inline in the PM files and others have
      >> their own .POD file. There is a LOT on Tk/Perl there.
      >
      > *.pod turned up lots in Win file searcher. Now I know more than I
      > did before.
      >
      >> PPM3-Bin.Bat causes my computer to spontaneously reboot. :( That bat
      >> file has a shortcut in the Activestate Perl group in the Windows
      >> Start Menu hierarchy.
      >
      > The shortcut in Win start menu is how i discovered its (ppm3-bin.bat)
      > existence. All 3 those .bat ppm, ppm3, ppm3-bin work on my 'puter.
      >
      >> See if you can figure out any of this Tk business.
      > (I'll research it some more during next few days to a week or so.)
      >
      > perldoc -q tk widget demo
      >
      > brought up an interesting documentation
      >
      > And, as you know, perldoc tk lists all its copious doc
      >
      >
      > (i not yet find the widget demo. But from perldoc tk/overview or
      > perldoc tk/userguide) here a quicky teeny demo (if shebang (1st) line
      > not match ur path just change the line accordingly):
      >
      > #! /perl/bin/perl -w
      > # tk_ex.pl be how I named it/the file
      > use strict;
      > use Tk;
      >
      > my $main = MainWindow->new;
      > $main->Label(-text => 'Hello, world!')->pack;
      > $main->Button(-text => 'Quit',
      > -command => [$main => 'destroy']
      > )->pack;
      > MainLoop;
      >
      >
      >> Did you get the searchdialog module?
      >
      > Yes. Got it installed. perldoc tk/searchdialog brought up its doc
      >
      > But I'm not near enuff to the Perl summit. I just saw a road/trail
      > sign that read: "understanding is allowed at a higher elevation level
      > please be inspired to keep on travelling in the direction of the
      > summit"
      >
      > On cpan www site the tk::searchdialog is version .44 (Linux) the Win
      > at activestate is ver. .41b
      >
      > the 41b probably not mean much. probably is latest Win (compiled)
      > version if it needs compiling as I guess that it seems that some .pm
      > are compiled while some have no need for compilation. but I'm
      > stretching here (road/trail sign)

      [Non-text portions of this message have been removed]
    • Alan C.
      Hi Alec, ... not. The .pm may need (after extraction) to be compiled. And the .pm if it work without compilation, is *very critical* where it s placed
      Message 2 of 5 , Jan 18, 2003
      • 0 Attachment
        Hi Alec,

        >I d/l'd both of these (they came as filename.tar.gz) and extracted them to the folder where I had the msgconv.pl.

        not. The .pm may need (after extraction) to be compiled. And the .pm if it work without compilation, is *very critical* where it's placed (usually under perl under site\lib) and then even in the ole folder since it begins with ole (maybe--I just noticed no ole folder exists on mine--but the folder might need to be created unless it doesn't need to be created). Read on, it gets better!

        What Perl distro you have? ActiveState? Cpan? Version? Which Win OS?

        > Windows users without a working "make" can get nmake from:
        > ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe

        You downloaded the source, source code, of which can be made, (compiled) made into a module and installed as a module. Various tools such as the one mentioned above along with compilation needed as well as all the know how that goes along with that.

        cpan unless what you seek states specifically for windows too then it's for Linux. Lot of stuff at cpan probably can be *_*compiled*_* for either OS. Linux comes native with compilers and developer's tools.

        That said, sometime can get away with copy a cpan .pm to a certain folder on a Win 'puter. But the folder has to be exactly rightly named as well as located in the correct spot. And, if works, lucky, a bonus! But i heard it not always work. So, if it don't work, then that leaves us at . . .

        >folder where I had the msgconv.pl. Obviously there is something else I have to do because when I run it I get this error message:
        >>>Can't locate OLE/Storage_Lite.pm in @INC (@INC contains: C:/Perl/Perl_5.8/lib C:/Perl/Perl_5.8/site/
        >-notins\MsgConvert\msgconvert.pl line 43.
        >BEGIN failed--compilation aborted at C:\Program Files\AmbPF-notins\MsgConvert\msgconvert.pl line 43.<<

        well probably it didn't find your ole::storage_lite module. Why not find? Probably it not located as precisely as what I had mentioned previously.

        If U ActiveState Perl on your 'puter it recommended to check with them first for module needs and resort to Cpan only if not available at former.

        If ActiveState Perl U have, then I'd delete what you copied from cpan

        And then-- Be online, connected to internet. open command prompt, type

        ppm then enter key

        search ole then enter key

        Aha! They have it (I cheated-I checked already)

        Whilst still online and within the ppm shell, type

        install ole-storage_lite then enter key

        if activestate try above then try it again, maybe it find it this time and work.

        --
        Alan.
      • Adkins, Brad J
        Here is an except from the README file in the OLE::Storage_Lite module: DESCRIPTION This module allows you to read and write an OLE-Structured file. The module
        Message 3 of 5 , Jan 20, 2003
        • 0 Attachment
          Here is an except from the README file in the OLE::Storage_Lite module:

          DESCRIPTION
          This module allows you to read and write an OLE-Structured file.

          The module will work on the majority of Windows, UNIX and
          Macintosh platforms.

          REQUIREMENT
          This module requires these modules:
          IO::Handle (included in IO)
          IO::File (included in IO)
          IO::Scalar (included in IO::Stringy)

          INSTALLATION
          The module can be installed using the standard Perl procedure:

          perl Makefile.PL
          make *** nmake on Windows
          make test *** nmake on Windows
          make install *** nmake on Windows
          make clean *** nmake on Windows

          Windows users without a working "make" can get nmake from:
          ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe

          If you follow the instructions under "INSTALLATION", you should have no problems. You will have to get nmake first if you don't already have it. Look under requirements, download and install those first, generally in the order shown, before trying to install OLE::Storage_Lite.

          Good luck!

          ***

          -----Original Message-----
          From: Alec Burgess [mailto:burale@...]
          Sent: Saturday, January 18, 2003 10:02 PM
          To: ntb-scripts@yahoogroups.c
          Subject: [NTS] Re: [list_a] Re: [Clip] Ad hoc Perl Regexp Replacements


          Sheri, Alan:

          As the closest to Perl "experts" I know - maybe you can help me out with something that is probably simple.
          How does the "use" statement (directive?) work.

          Specifically: I downloaded a perl utility which is supposed to convert "msg" files to "mbox" files (I want to import mail cached by Popfile into Zoe)

          This web-site for this utility: http://www.xs4all.nl/~mvz/software/msgconv.html says :
          >>This program is written in Perl and uses the modules OLE::Storage_Lite and part of MIME-Tools. OLE::Storage_Lite is used to parse the .MSG file (It's an OLE compound document). MIME-Tools is used to put the parts of the message together to create a MIME entity from it.<<
          OLE::Storage_Lite http://search.cpan.org/author/KWITKNR/OLE-Storage_Lite-0.10/
          MIME-Tools http://search.cpan.org/author/ERYQ/MIME-tools-5.411a/

          I d/l'd both of these (they came as filename.tar.gz) and extracted them to the folder where I had the msgconv.pl. Obviously there is something else I have to do because when I run it I get this error message:
          >>Can't locate OLE/Storage_Lite.pm in @INC (@INC contains: C:/Perl/Perl_5.8/lib C:/Perl/Perl_5.8/site/
          -notins\MsgConvert\msgconvert.pl line 43.
          BEGIN failed--compilation aborted at C:\Program Files\AmbPF-notins\MsgConvert\msgconvert.pl line 43.<<

          Lines 41-46 in msgconvert say:
          >>
          use strict;
          use Getopt::Long;
          use OLE::Storage_Lite;
          use MIME::Entity;
          use MIME::Parser;
          use Pod::Usage;<<

          the readme in OLE-storage_lite says
          >>INSTALLATION
          The module can be installed using the standard Perl procedure:

          perl Makefile.PL
          make
          make test
          make install # You may need to be root
          make clean # or make realclean

          Windows users without a working "make" can get nmake from:
          ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe

          <<

          Do either of you (or anyone) follow what I'm being asked to do? It seems to be in Greek ;-) to me.

          Regards ... Alec
          --

          ---- Original Message ----
          From: "Alan C." <acumming@...>
          To: <ntb-clips@yahoogroups.com>
          Sent: Saturday, January 18, 2003 18:33
          Subject: [list_a] Re: [Clip] Ad hoc Perl Regexp Replacements

          > Hi Sheri,
          >
          >> It looks like some docs are inline in the PM files and others have
          >> their own .POD file. There is a LOT on Tk/Perl there.
          >
          > *.pod turned up lots in Win file searcher. Now I know more than I
          > did before.
          >
          >> PPM3-Bin.Bat causes my computer to spontaneously reboot. :( That bat
          >> file has a shortcut in the Activestate Perl group in the Windows
          >> Start Menu hierarchy.
          >
          > The shortcut in Win start menu is how i discovered its (ppm3-bin.bat)
          > existence. All 3 those .bat ppm, ppm3, ppm3-bin work on my 'puter.
          >
          >> See if you can figure out any of this Tk business.
          > (I'll research it some more during next few days to a week or so.)
          >
          > perldoc -q tk widget demo
          >
          > brought up an interesting documentation
          >
          > And, as you know, perldoc tk lists all its copious doc
          >
          >
          > (i not yet find the widget demo. But from perldoc tk/overview or
          > perldoc tk/userguide) here a quicky teeny demo (if shebang (1st) line
          > not match ur path just change the line accordingly):
          >
          > #! /perl/bin/perl -w
          > # tk_ex.pl be how I named it/the file
          > use strict;
          > use Tk;
          >
          > my $main = MainWindow->new;
          > $main->Label(-text => 'Hello, world!')->pack;
          > $main->Button(-text => 'Quit',
          > -command => [$main => 'destroy']
          > )->pack;
          > MainLoop;
          >
          >
          >> Did you get the searchdialog module?
          >
          > Yes. Got it installed. perldoc tk/searchdialog brought up its doc
          >
          > But I'm not near enuff to the Perl summit. I just saw a road/trail
          > sign that read: "understanding is allowed at a higher elevation level
          > please be inspired to keep on travelling in the direction of the
          > summit"
          >
          > On cpan www site the tk::searchdialog is version .44 (Linux) the Win
          > at activestate is ver. .41b
          >
          > the 41b probably not mean much. probably is latest Win (compiled)
          > version if it needs compiling as I guess that it seems that some .pm
          > are compiled while some have no need for compilation. but I'm
          > stretching here (road/trail sign)

          [Non-text portions of this message have been removed]



          ntb-scripts-unsubscribe@yahoogroups.com



          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        • Alec Burgess
          Thanks Brad - that makes it a lot clearer. I ll have a crack at it in the next couple of days. Regards ... Alec -- ... From: Adkins, Brad J
          Message 4 of 5 , Jan 20, 2003
          • 0 Attachment
            Thanks Brad - that makes it a lot clearer. I'll have a crack at it in the
            next couple of days.

            Regards ... Alec
            --

            ---- Original Message ----
            From: "Adkins, Brad J" <brad.j.adkins@...>
            To: <ntb-scripts@yahoogroups.com>
            Sent: Monday, January 20, 2003 13:41
            Subject: [NTS] Re: [list_a] Re: [Clip] Ad hoc Perl Regexp Replacements

            <snip>
            > INSTALLATION
            > The module can be installed using the standard Perl procedure:
            >
            > perl Makefile.PL
            > make *** nmake on Windows
            > make test *** nmake on Windows
            > make install *** nmake on Windows
            > make clean *** nmake on Windows
            >
            > Windows users without a working "make" can get nmake from:
            > ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
            >
            > If you follow the instructions under "INSTALLATION", you should have
            > no problems. You will have to get nmake first if you don't already
            > have it. Look under requirements, download and install those first,
            > generally in the order shown, before trying to install
            > OLE::Storage_Lite.
            <snip>
          • Alan C.
            Hi Alec, I re looked my former post. However I came across, I didn t mean to be terse. Awkward, yes. Terse, no (not meant to be anyway). I ve ActiveState
            Message 5 of 5 , Jan 20, 2003
            • 0 Attachment
              Hi Alec,

              I re looked my former post. However I came across, I didn't mean to be terse. Awkward, yes. Terse, no (not meant to be anyway).

              I've ActiveState Perl. (I didn't yet found out what distribution you have)

              I not try to sway you as to what you decide. But I've not learned to compile, not yet. It on my to do list.

              The ppm works with packages, so no compilation is needed.

              Anyway, I had neither the ole-storage_lite nor the mime-tools on my 'puter.

              (ppm query)

              So I just a few minutes ago installed them using ppm

              And now, I may/might be ready to run the msgconvrt.pl But I don't know what uses .msg if I have any those or not.

              But anyway so far I just wanted to and did see what happen by installing those two mentioned packages.

              I first installed ole-storage_lite (took less than a minute) its installation created two new folders as well as files as can see below

              Next I installed the mime-tools its installation added onto the pre existing mime folder also creating new files and three new sub folders therein. This one was the larger install of the two took probably near two minutes. (display of before and after further below)

              It looks to me like this package manager installs all needed files and packages that are needed for the particular module (package) that's installed.

              commands used:

              ppm

              install ole-storage_lite

              install mime-tools
              --

              Next two folders (OLE and IO did not exist until I installed ole-storage_lite)

              D:\Perl\site\lib\OLE

              Directory of D:\Perl\site\lib\OLE

              01/20/2003 05:38p <DIR> .
              01/20/2003 05:38p <DIR> ..
              11/27/2002 01:16a 55,791 Storage_Lite.pm


              D:\Perl\site\lib\IO

              Directory of D:\Perl\site\lib\IO

              07/15/2002 10:13p <DIR> .
              07/15/2002 10:13p <DIR> ..
              04/12/2002 01:50p 5,148 SessionSet.pm
              05/24/2002 06:46p 6,438 SessionData.pm
              06/14/2002 01:33a 4,937 AtomicFile.pm
              06/14/2002 01:33a 5,771 InnerFile.pm
              06/14/2002 01:33a 4,350 Lines.pm
              06/14/2002 01:33a 17,281 Scalar.pm
              08/22/2001 06:58a 14,929 Scalar.pm.html
              06/14/2002 01:33a 18,173 ScalarArray.pm
              06/14/2002 01:33a 12,645 Stringy.pm
              06/14/2002 01:33a 5,088 Wrap.pm
              06/14/2002 01:33a 15,090 WrapTie.pm



              D:\Perl\site\lib\MIME

              My MIME folder BEFORE installation of mime-tools

              Directory of D:\Perl\site\lib\MIME

              07/15/2002 10:13p <DIR> .
              07/15/2002 10:13p <DIR> ..
              12/06/2001 01:51p 5,993 Base64.pm
              12/06/2001 01:51p 3,071 QuotedPrint.pm

              My MIME folder AFTER installation of mime-tools

              Directory of D:\Perl\site\lib\MIME

              07/15/2002 10:13p <DIR> .
              07/15/2002 10:13p <DIR> ..
              12/06/2001 01:51p 5,993 Base64.pm
              12/06/2001 01:51p 3,071 QuotedPrint.pm
              06/14/2002 04:29a 17,106 Body.pm
              06/14/2002 04:29a 16,673 Decoder.pm
              06/14/2002 04:29a 66,329 Entity.pm
              06/14/2002 04:29a 25,709 Head.pm
              06/14/2002 04:29a 54,276 Parser.pm
              06/14/2002 04:29a 63,439 Tools.pm
              06/14/2002 04:29a 15,802 WordDecoder.pm
              06/14/2002 04:29a 11,646 Words.pm
              01/20/2003 06:04p <DIR> Parser
              01/20/2003 06:04p <DIR> Field
              01/20/2003 06:04p <DIR> Decoder

              --
              Alan.
            Your message has been successfully submitted and would be delivered to recipients shortly.