[23819] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6022 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 29 20:51:27 2004

Date: Thu, 29 Jan 2004 17:45:54 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 29 Jan 2004     Volume: 10 Number: 6022

Today's topics:
    Re: Microsoft .NET and perl 3DES encryption <kalinaubears@iinet.net.au>
    Re: Microsoft .NET and perl 3DES encryption (Jerry Maguire)
    Re: Microsoft .NET and perl 3DES encryption <kalinaubears@iinet.net.au>
        MIME::Lite Message Body <provicon@earthlink.net>
        mind-numbing numification (Unknown Poster)
    Re: mind-numbing numification (Jay Tilton)
        Module NET::POP3_ssl (Robert)
        Module NET::POP3_ssl (Robert)
        Module packaging conundrum <jill_krugman@yahoo.com>
    Re: Module packaging conundrum <theaney@cablespeed.com>
    Re: Module packaging conundrum <noreply@gunnar.cc>
    Re: Module packaging conundrum <jill_krugman@yahoo.com>
    Re: Module packaging conundrum <jill_krugman@yahoo.com>
        module to transfer files? (D. Alvarado)
    Re: module to transfer files? <noreply@gunnar.cc>
    Re: module to transfer files? <tore@aursand.no>
    Re: module to transfer files? <nospam@bigpond.com>
    Re: module to transfer files? <jwillmore@remove.adelphia.net>
        Module versions? <raj@intelc64.net>
    Re: Module versions? <spamtrap@dot-app.org>
    Re: Module versions? <ittyspam@yahoo.com>
        monitoring websphere through perl? <mikee@mikee.ath.cx>
    Re: multiplexed IO suggestion? (Walter Roberson)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 22 Jan 2004 08:35:08 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Microsoft .NET and perl 3DES encryption
Message-Id: <400ef179$0$1754$5a62ac22@freenews.iinet.net.au>

Jerry Maguire wrote:
> Hi,
> I am having difficulty getting the same results of the encrypted
> packet on .NET platform adn linux perl platform.
> Following are the detaisl of the 2 platforms:
> 
> Platform 1:
> ----------
> Microsoft .NET platform used to encrypt (3DES) and then encode a
> string
> 
> Platform 2:
> -------------
> Linux + perl with MIME-Base64, TripleDES, EDE, CBC modules
> 
> I am trying to encrypt a string on .NET platform. When I am trying to
> encrypt the same string on linux+perl platform, I am getting a
> different result.
> 
> Can anyone let me know which modules should i use on perl to get the
> same encryption result as Microsoft platform?.

Crypt::DES perhaps ?


 > I am using the
> following program to encrypt the string on microsoft .net:
> 
> 
> http://www.codeproject.com/dotnet/encryption_decryption.asp
> 

I see DES, RC2, and Rijndael mentioned in the source code - but does it 
actually do 3DES ?

What happens if you use Rijndael (and Crypt::Rijndael on the perl side) ?

Cheers,
Rob


-- 
To reply by email u have to take out the u in kalinaubears.



------------------------------

Date: 23 Jan 2004 04:33:38 -0800
From: kapilcool@hotmail.com (Jerry Maguire)
Subject: Re: Microsoft .NET and perl 3DES encryption
Message-Id: <edc6181d.0401230433.9d49b32@posting.google.com>

Hi,
Thanks for your reply. I tried to use DES on perl but still not
getting the same results.
I am attaching my perl program with this email. Can you please advise?

My perl program:
-------------------

#!/usr/bin/perl
#
# get libraries
use Crypt::CBC;
use Crypt::DES;
use MIME::Base64;
 
$DEPACKET = "testing";
 
$DES = Crypt::CBC->new( {'key'     => '1234567890',
                         'cipher'  => 'DES',
                         'iv'      => 'testing',
                         'padding' => 'space',
                         'prepand_iv' => 0 });
                         
$ENCRYPTPACKET = $DES->encrypt($DEPACKET);
 
#encode the packet
$ENCODEPACKET = &encode_base64($ENCRYPTPACKET);
 
 
#display the results
print "The encrypted packet is:\n";
print $ENCRYPTPACKET;
print "The encrypted and encoded packet is:\n";
print $ENCODEPACKET;


--------end of program---------------


Thanks
Jerry


------------------------------

Date: Sat, 24 Jan 2004 13:27:25 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Microsoft .NET and perl 3DES encryption
Message-Id: <4011d8fd$0$1743$5a62ac22@freenews.iinet.net.au>

Jerry Maguire wrote:

> 
> #!/usr/bin/perl
> #
> # get libraries
> use Crypt::CBC;
> use Crypt::DES;
> use MIME::Base64;
>  
> $DEPACKET = "testing";
>  
> $DES = Crypt::CBC->new( {'key'     => '1234567890',
>                          'cipher'  => 'DES',
>                          'iv'      => 'testing',
>                          'padding' => 'space',
>                          'prepand_iv' => 0 });
>                          
> $ENCRYPTPACKET = $DES->encrypt($DEPACKET);
>  
> #encode the packet
> $ENCODEPACKET = &encode_base64($ENCRYPTPACKET);
>  
>  
> #display the results
> print "The encrypted packet is:\n";
> print $ENCRYPTPACKET;
> print "The encrypted and encoded packet is:\n";
> print $ENCODEPACKET;
> 
> 

'prepand_iv' needs to be changed to 'prepend_iv' - and you'll then get a 
different output. Does that fix the problem ?

Also 'use warnings;'.

Cheers,
Rob

-- 
To reply by email u have to take out the u in kalinaubears.



------------------------------

Date: Tue, 20 Jan 2004 01:00:30 GMT
From: "John" <provicon@earthlink.net>
Subject: MIME::Lite Message Body
Message-Id: <O4%Ob.18015$1e.1782@newsread2.news.pas.earthlink.net>

I run the code below, and something strange happens:

use strict;
use MIME::Lite;
use Net::SMTP;
my $from = 'steve@earthlink.net';
my @addweek1 = qw(michael@earthlink.net
     );

my $subject='Issue 11';

for my $address (@addweek1) {
my $msg = MIME::Lite->new (
               From     => $from,
               To       => $address,

               Subject  => $subject,
               Type     =>'multipart/related');

$msg->attach (
               Type => 'text/html',
               Path => 'c:/message.html');


MIME::Lite->send('smtp', 'smtp.earthlink.net');
$msg->send();
}

I run the code above, and I opened my Outlook.  1 email came in.  And the
email has the sign of attachment: the clip on the left, which means there is
an attachment with an email.

And at the bottom pane, I see the body of email, which I wish to be there.
But if I double click that email, the body is completely blank / disapper,
and the
attachment sign, clip disappears.

What is left out of is an email without anything in the body.

How can I make the body of the email stay in there using the code above??
The reason I am developing above code is rather than inserting HTML email
body, I wish it to be called in.  But when I run above code, it is not
working out.

Any help will be deeply appreciated.

Thanks.

Strange..




------------------------------

Date: 28 Jan 2004 16:31:00 -0800
From: use63net@yahoo.com (Unknown Poster)
Subject: mind-numbing numification
Message-Id: <c62e93ec.0401281631.53ceb540@posting.google.com>

X-No-archive: yes

This is perl, v5.6.1 built for MSWin32-x86-multi-thread
-----
package Rational;

use overload "0+" => \&float;

# There is a subroutine called float() that, well, returns a float.
------
use Rational;
 .
 .
 .
#$fraction holds an object of type Rational
my $fsq = sqrt($fraction);
------------
perl complains: 
Operation sqrt: no method found, argument in overloaded package Rational at ...

Since sqrt() takes a numeric argument, I expected the overloading of "0+"
to force float() to be called on the object $fraction, but it doesn't work.
The code "my $fsq = sqrt($fraction->float());" compiles OK.
Why isn't numification working in this case?


------------------------------

Date: Thu, 29 Jan 2004 02:13:24 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: mind-numbing numification
Message-Id: <4018693a.31503707@news.erols.com>

use63net@yahoo.com (Unknown Poster) wrote:

: X-No-archive: yes

Why?  Yours is a good question.

: package Rational;
: 
: use overload "0+" => \&float;
: 
: # There is a subroutine called float() that, well, returns a float.
: ------
: use Rational;
: #$fraction holds an object of type Rational
: my $fsq = sqrt($fraction);
: ------------
: perl complains: 
: Operation sqrt: no method found, argument in overloaded package Rational at ...
: 
: Since sqrt() takes a numeric argument, I expected the overloading of "0+"
: to force float() to be called on the object $fraction, but it doesn't work.

Because sqrt() is itself an overloadable operator.

You can either let the overload pragma handle this on its own:

    use overload 
        "0+" => \&float,
        fallback => 1;
    

or, probably better, go ahead and overload sqrt:

    use overload
        "0+" => \&float,
        "sqrt" => sub { sqrt($_[0]->float) };



------------------------------

Date: 27 Jan 2004 23:04:28 -0800
From: robert@itmsvs.com (Robert)
Subject: Module NET::POP3_ssl
Message-Id: <579d0b9f.0401272304.36715067@posting.google.com>

Posting this for those would like to test. Modified version of Barr's
Net::POP3 in order to connect to POP3 servers over SSL.

Test module based on Gram Barr's Net::POP3 module which will allow a
connection to a POP3 server over SSL. I needed this, and there seems
to be a need by others and I prefer Gram's module. Perl Module POP3
SSL. Net::POP3_ssl

Comments welcome.


------------------------------

Date: 27 Jan 2004 23:05:44 -0800
From: robert@itmsvs.com (Robert)
Subject: Module NET::POP3_ssl
Message-Id: <579d0b9f.0401272305.23d910c3@posting.google.com>

Posting this for those would like to test. Modified version of Barr's
Net::POP3 in order to connect to POP3 servers over SSL.

Test module based on Gram Barr's Net::POP3 module which will allow a
connection to a POP3 server over SSL. I needed this, and there seems
to be a need by others and I prefer Gram's module. Perl Module POP3
SSL. Net::POP3_ssl

Comments welcome.

http://www.cgiexpo.com/files/net-pop3_ssl.html


------------------------------

Date: Fri, 23 Jan 2004 22:01:34 +0000 (UTC)
From: J Krugman <jill_krugman@yahoo.com>
Subject: Module packaging conundrum
Message-Id: <bus5ju$808$1@reader2.panix.com>




I want to package some Perl software for distribution using MakeMaker,
but there's a problem, having to do with the nature of the software
and its expected audience.  First, the heart of the package is a
CGI script that uses modules in the package.  Second, a large
fraction (maybe the majority) of this software's intended audience
will not have administrator powers.  This means that the modules
in the package will necessarily be installed in a special location
unknown to the server serving the CGI script.

What's the best way to deal with this situation?  I suppose that
I could have some kluge in Makefile.PL that figured out the intended
installation directory and programmatically inserted the appropriate
'use lib ...' statements into the Perl source, but I find this
solution profoundly unsavory, but it's the only thing I can come
up with.

Any ideas?

Thanks!

Jill




------------------------------

Date: Fri, 23 Jan 2004 17:35:20 -0500
From: Tim Heaney <theaney@cablespeed.com>
Subject: Re: Module packaging conundrum
Message-Id: <87smi69tuf.fsf@mrbun.watterson>

J Krugman <jill_krugman@yahoo.com> writes:
>
> Any ideas?

How about FindBin? Just run 'perldoc FindBin'; it's a core module.

Tim


------------------------------

Date: Fri, 23 Jan 2004 23:42:24 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Module packaging conundrum
Message-Id: <bus87l$llms9$1@ID-184292.news.uni-berlin.de>

J Krugman wrote:
> I want to package some Perl software for distribution using
> MakeMaker, but there's a problem, having to do with the nature of
> the software and its expected audience.  First, the heart of the
> package is a CGI script that uses modules in the package.  Second,
> a large fraction (maybe the majority) of this software's intended
> audience will not have administrator powers.  This means that the
> modules in the package will necessarily be installed in a special
> location unknown to the server serving the CGI script.

My first (and so far only) CPAN module fits your description. I
thought about simply publishing the code as a script instead, but I
finally decided to put the principal code in a couple of modules and
make the CGI script basically a 'wrapper' with just a few lines of code.

I believe that most users among my intended audience don't know what
MakeMaker and Makefile.PL are. Consequently, I included a section in
the POD which describes rather detailed how to install the package by
just uploading the .pm files to a local Perl library:

     http://search.cpan.org/perldoc?CGI%3A%3AContactForm

Maybe that can give you some idea.

I'm very interested in getting to know about the solution you finally
decide to apply.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Fri, 23 Jan 2004 23:22:44 +0000 (UTC)
From: J Krugman <jill_krugman@yahoo.com>
Subject: Re: Module packaging conundrum
Message-Id: <busac4$9hh$1@reader2.panix.com>

In <bus87l$llms9$1@ID-184292.news.uni-berlin.de> Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>I believe that most users among my intended audience don't know what
>MakeMaker and Makefile.PL are. Consequently, I included a section in
>the POD which describes rather detailed how to install the package by
>just uploading the .pm files to a local Perl library...

In my case it is hard to avoid MakeMaker, because the software
includes a Perl extension in C, so compilation and proper placement
of the resulting files is required.

Jill



------------------------------

Date: Sat, 24 Jan 2004 04:04:02 +0000 (UTC)
From: J Krugman <jill_krugman@yahoo.com>
Subject: Re: Module packaging conundrum
Message-Id: <busqri$eha$1@reader2.panix.com>

In <87smi69tuf.fsf@mrbun.watterson> Tim Heaney <theaney@cablespeed.com> writes:

>How about FindBin? Just run 'perldoc FindBin'; it's a core module.

I think this will do the trick.  Thanks!

jill



------------------------------

Date: 21 Jan 2004 14:01:48 -0800
From: laredotornado@zipmail.com (D. Alvarado)
Subject: module to transfer files?
Message-Id: <9fe1f2ad.0401211401.3a16b899@posting.google.com>

Hello, I'm trying to find some module that will copy a directory from
one computer to a server via FTP.  That is, it will overwrite the
directory on the remote server if it already exists or create one if
it doesn't.   Thanks - Dave


------------------------------

Date: Wed, 21 Jan 2004 23:22:24 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: module to transfer files?
Message-Id: <bumu5s$jjale$1@ID-184292.news.uni-berlin.de>

D. Alvarado wrote:
> I'm trying to find some module that will copy a directory from one
> computer to a server via FTP.  That is, it will overwrite the 
> directory on the remote server if it already exists or create one
> if it doesn't.

Which of the modules at CPAN are you considering to make use of for
that task?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Thu, 22 Jan 2004 00:11:32 +0100
From: Tore Aursand <tore@aursand.no>
Subject: Re: module to transfer files?
Message-Id: <pan.2004.01.21.23.09.12.187087@aursand.no>

On Wed, 21 Jan 2004 14:01:48 -0800, D. Alvarado wrote:
> Hello, I'm trying to find some module that will copy a directory from
> one computer to a server via FTP.  That is, it will overwrite the
> directory on the remote server if it already exists or create one if it
> doesn't.

Why don't you check CPAN [1] first?  A search for 'FTP' in the module name
will certainly give you a lot of (interesting) hits.

Anyway.  You could take a look at Net::FTP, which comes with the Perl
distribution.  I haven't had the need to use it myself yet, but a quick
look at 'perldoc Net::FTP' assures me that this is a starting point.

[1] <http://www.cpan.org/>


-- 
Tore Aursand <tore@aursand.no>
"Leadership is doing what is right when no one is watching." -- George
 Van Valkenburg


------------------------------

Date: Thu, 22 Jan 2004 12:19:31 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: module to transfer files?
Message-Id: <bunc1a$jo7d6$1@ID-202028.news.uni-berlin.de>

D. Alvarado wrote:

> Hello, I'm trying to find some module that will copy a directory from
> one computer to a server via FTP.  That is, it will overwrite the
> directory on the remote server if it already exists or create one if
> it doesn't.   Thanks - Dave

Maybe you need http://samba.anu.edu.au/rsync/

gtoomey


------------------------------

Date: Thu, 22 Jan 2004 04:26:46 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: module to transfer files?
Message-Id: <pan.2004.01.22.04.26.43.935519@remove.adelphia.net>

On Wed, 21 Jan 2004 14:01:48 -0800, D. Alvarado wrote:

> Hello, I'm trying to find some module that will copy a directory from
> one computer to a server via FTP.  That is, it will overwrite the
> directory on the remote server if it already exists or create one if
> it doesn't.   Thanks - Dave

Net::FTP :-)

If that doesn't fit the bill, then visit
http://search.cpan.org/
and search for ftp.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Weinberg's First Law:  Progress is made on alternate Fridays. 




------------------------------

Date: Wed, 28 Jan 2004 13:43:54 -0500
From: RajW <raj@intelc64.net>
Subject: Module versions?
Message-Id: <3g0g10973nnd0iu55lqr9pqst7uoouctbm@4ax.com>


Simple question... How do I determine what the version numbers of the
modules I have installed on my system (Linux/x86)?

i.e. How do I determine what version of  Pod::Usage is installed?

Thanks,
/*Raj*/



------------------------------

Date: Wed, 28 Jan 2004 13:52:15 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Module versions?
Message-Id: <GsSdndzZkP1CmYXdRVn-vA@adelphia.com>

RajW wrote:

> Simple question... How do I determine what the version numbers of the
> modules I have installed on my system (Linux/x86)?
> 
> i.e. How do I determine what version of  Pod::Usage is installed?

I use the CPAN shell - just enter 'i Module::Name' and it tells you about
the module, including the installed version (if any) and the latest version
available from CPAN.

sherm--


------------------------------

Date: Wed, 28 Jan 2004 14:03:33 -0500
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: Module versions?
Message-Id: <20040128140303.M29989@dishwasher.cs.rpi.edu>

On Wed, 28 Jan 2004, RajW wrote:

> Simple question... How do I determine what the version numbers of the
> modules I have installed on my system (Linux/x86)?
>
> i.e. How do I determine what version of  Pod::Usage is installed?
>

perl -MPod::Usage -e 'print "$Pod::Usage::VERSION\n";'


Paul Lalli


------------------------------

Date: Fri, 23 Jan 2004 22:30:48 -0000
From: Mike <mikee@mikee.ath.cx>
Subject: monitoring websphere through perl?
Message-Id: <101384ognvd5193@corp.supernews.com>

Does anyone already have some code/a module to monitor IBM WebSphere?

Mike


------------------------------

Date: 21 Jan 2004 23:19:36 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: multiplexed IO suggestion?
Message-Id: <bun1e8$s3u$1@canopus.cc.umanitoba.ca>

In article <buiu5l$33h$1@canopus.cc.umanitoba.ca>,
Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> wrote:
[lessons learned about perl threads]

17) If you try to use Storable to save a shared variable, you will
just get a string that makes reference to Tied, and the actual contents
will not be saved. Work around: copy the data into a temporary variable
and save that temporary variable.
-- 
Warning: potentially contains traces of nuts.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 6022
***************************************


home help back first fref pref prev next nref lref last post