[24746] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6901 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 23 18:10:16 2004

Date: Mon, 23 Aug 2004 15:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 23 Aug 2004     Volume: 10 Number: 6901

Today's topics:
        ANNOUNCE: Archive::Zip 1.13 released <ned@bike-nomad.com>
    Re: Confusion of Win32::ODBC under CygWin. Please help. <ceo@nospan.on.net>
    Re: finding directory sizes <Joe.Smith@inwap.com>
    Re: finding directory sizes <zebee@zip.com.au>
        Formmail.pl - Sendmail vs. Smtp <blahblah@blah.com>
    Re: Formmail.pl - Sendmail vs. Smtp <spamtrap@dot-app.org>
    Re: Formmail.pl - Sendmail vs. Smtp <noreply@gunnar.cc>
    Re: Formmail.pl - Sendmail vs. Smtp <ceo@nospan.on.net>
    Re: How to randomize foreach (Anno Siegel)
    Re: How to randomize foreach (Anno Siegel)
    Re: How to randomize foreach <abigail@abigail.nl>
    Re: How to randomize foreach <gifford@umich.edu>
        Net::SMTP and attachments (suchintya)
    Re: Net::SMTP and attachments <noreply@gunnar.cc>
    Re: Net::SMTP and attachments <tony_curtis32@yahoo.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 23 Aug 2004 15:49:41 GMT
From: Ned Konz <ned@bike-nomad.com>
Subject: ANNOUNCE: Archive::Zip 1.13 released
Message-Id: <I2wpp5.1v2A@zorch.sf-bay.org>

Archive::Zip v1.13 has been released on August 23, 2004.

This is the same version as the developer version named 1.12_03 that has
been tested for some time by the MailScanner community.  Thanks to David
Lee and the MailScanner community, as well as to the Amavis community
for their continued help with the maintenance of Archive::Zip. Since I
don't use Perl any more, this help is greatly appreciated.

Changes since v1.12 of 8 Jul 2004 include:

  - Fixed tempfile unlink/rename bug in Win32
  - Avoid taint complaints in tree operations
  - Cures problems with t/testex test on older Perl versions

Notes for this version:

  - Some testers on older (Perl 5.500503) systems have reported
    'uninitialized value' messages in t/testUpdate.t. Apparently,
    updating to version 1.25 of the Test module fixes this warning.

  - There is a recently-reported bug where if you read a zip that has
    been written with data descriptors (like OpenOffice or Java JAR
    files), extract a file, and then re-write the zip, you will get a
    mismatch error. To work around this for now, you can do something
    like this:

        # read the zip

        # remember the compressed sizes
        foreach my $member ( $zip->members() ) {
          $member->{'originalCompressedSize'} =
            $member->{'compressedSize'};
        }

        # extract member(s)

        # restore compressed sizes
        foreach my $member ( $zip->members() ) {
          $member->{'compressedSize'} = 
            $member->{'originalCompressedSize'}
                if defined($member->{'originalCompressedSize'});
        }

        # write the zip


>From the README:

The Archive::Zip module allows a Perl program to create, manipulate,
read, and write Zip archive files.

Zip archives can be created, or you can read from existing zip files
or strings (using IO::Scalar). Once created, they can be written to
files, streams, or strings.

Members can be added, removed, extracted, replaced, rearranged, and
enumerated.  They can also be renamed or have their dates, comments, or
other attributes queried or modified.  Their data can be compressed or
uncompressed as needed.  Members can be created from members in existing
Zip files, or from existing directories, files, or strings.
Directory trees can be added or extracted simply using special tree
routines.

This module uses the Compress::Zlib library to read and write the
compressed streams inside the files. Note that versions of Compress::Zlib
prior to 1.06 truncate data and should not be used.

Compress::Zlib prior to 1.08 caused crashes on some Windows systems.

Examples and helper libraries are given to show how:
  * zip files can be read and written to strings
  * zip files can be written in chunks to arbitrary functions

CHANGES SINCE v1.00:


1.12 8 Jul 2004 19:11:53 / 1.11 (removed) 23 Aug 2004 12:56:25

  - Use File::Temp for more secure tempfile handling
    (thanks to Alexey Tourbin of the ALT Linux Team)

  - Fix to avoid endless looping on certain corrupt zip files
    (thanks to Julian Field)
  - Handling of zip files with data descriptors (like some Java JAR files)
  - Handle unicode strings as input to Archive::Zip::Member::contents(), 
    Archive::Zip::Member::contents(), and
Archive::Zip::Archive::zipfileComment()
    (thanks to Geoffrey D. Bennett)

1.10 Thu Mar 25 06:24:17 PST 2004
  - Fixed documentation of setErrorHandler()
  - Fixed link to Japanese translation of docs
  - Added Compress::Zlib Bufsize patch from Yeasah Pell that was supposed to
    have been added in 1.02
  - Fixed problems with backup filenames for zips with no extension
  - Fixed problems with undef volume names in _asLocalName()

1.09 Wed Nov 26 17:43:49 PST 2003
  - Fixed handling of inserted garbage (as from viruses)
  - Always check for local header signatures before using them
  - Added updateMember() and updateTree() functions
  - Added examples/mailZip.pl
  - Added examples/updateTree.pl
  - Fixed some potential but unreported bugs with function parameters like
'0'
  - Removed stray warn() call
  - Caught undef second arg to replaceMember()

1.08 Tue Oct 21 07:01:29 PDT 2003
  - test noise fix from Michael Schwern (ticket 4174)
  - FAQ NAME fix from Michael Schwern (ticket 4175)

1.07 Mon Oct 20 06:48:41 PDT 2003
  - Added file attribute code by Maurice Aubrey
  - Added FAQ about RedHat 9 build errors
  - Added check for empty filenames

1.06 Thu Jul 17 11:06:18 PDT 2003
  - Fixed seek use with IO::Scalar and IO::String
  - Fixed use of binmode with pseudo-file handles
  - Removed qr{} form for older Perl versions
  - Changed rel2abs logic in _asLocalName() if there is a volume
  - Fixed errors with making directories in extractMember() when none
provided
  - Return AZ_OK in extractMemberWithoutPaths() if member is a directory
  - Fixed problem in extractTree with blank directory becoming "." prefix
  - Added examples/writeScalar2.pl to show how to use IO::String as
destination of Zip write
  - Edited docs and FAQ to recommend against using absolute path names in
zip files.

1.05 Wed Sep 11 12:31:20 PDT 2002
  - fixed untaint from 1.04

1.04 Wed Sep 11 07:22:04 PDT 2002
  - added untaint of lastModFileDateTime

1.03 Mon Sep  2 20:42:43 PDT 2002
  - Removed dependency on IO::Scalar
  - Set required version of File::Spec to 0.8
  - Removed tests of examples that needed IO::Scalar
  - Added binmode() call to read/writeScalar examples
  - Fixed addTree() for 5.005 compatibility (still untested with 5.004)
  - Fixed mkdir() calls for 5.005
  - Clarified documentation of tree operations

1.02 Fri Aug 23 17:07:22 PDT 2002
  - Many changes for cross-platform use (use File::Spec everywhere)
  - Separated POD from Perl
  - Moved Archive::Zip::Tree contents into Archive::Zip
    A::Z::Tree is now deprecated and will warn with -w
  - Reorganized docs
  - Added FAQ
  - Added chunkSize() call to report current chunk size
    and added C::Z BufSize patch from Yeasah Pell.
  - Added fileName() to report last read zip file name
  - Added capability to prepend data, like for SFX files
  - Added examples/selfex.pl for self-extracting archives creation
  - Added examples/zipcheck.pl for validity testing
  - Made extractToFileNamed() set access/modification times
  - Added t/testTree.t to test A::Z::Tree
  - Fix/speed up memberNamed()
  - Added Archive::Zip::MemberRead by Sreeji K. Das
  - Added tempFile(), tempName()
  - Added overwrite() and overwriteAs() to allow read/modify/write of zip
  - added examples/updateZip.pl to show how to read/modify/write

1.01 Tue Apr 30 10:34:44 PDT 2002
  - Changed mkpath call for directories to work with BSD/OS
  - Changed tests to work with BSD/OS

COPYRIGHT:

Copyright (c) 2000-2004 Ned Konz. All rights reserved.  This program is free
software; you can redistribute it and/or modify it under the same terms
as Perl itself.

AVAILABILITY:

>From CPAN, in directory
  http://www.cpan.org/modules/by-authors/id/N/NE/NEDKONZ/
or
  ftp://ftp.cpan.org/pub/CPAN/modules/by-authors/id/N/NE/NEDKONZ/
as Archive-Zip-1.13.tar.gz




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

Date: Mon, 23 Aug 2004 19:03:15 GMT
From: Chris <ceo@nospan.on.net>
Subject: Re: Confusion of Win32::ODBC under CygWin. Please help...
Message-Id: <TbrWc.5880$Y94.4465@newssvr33.news.prodigy.com>

MartinM wrote:
> Hi,
> 
> I use Perl under Cygwin. I need to use Win32::ODBC. It is located 
> in
> 
> c:\cygwin\lib\perl5\site_perl\5.8.2\cygwin-thread-multi-64int\Win32\ODBC.pm
> 
> but this path is not in @INC. There are just links 5.8.5 not 5.8.2 
> in the @INC and (to my surprise), the 5.8.5/cygwin-thread-multi-64int 
> is completely empty.
> 
> The @INC includes:
>   /usr/lib/perl5/5.8.5/cygwin-thread-multi-64int
>   /usr/lib/perl5/5.8.5
>   /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int
>   /usr/lib/perl5/site_perl/5.8.5
>   /usr/lib/perl5/site_perl
>   /usr/lib/perl5/vendor_perl/5.8.5/cygwin-thread-multi-64int
>   /usr/lib/perl5/vendor_perl/5.8.5
>   /usr/lib/perl5/vendor_perl
> 
> So the execution of code with use Win32::ODBC; ends up with 
> Can't locate Win32/ODBC...
> 
> If I copy content of 5.8.2/ into 5.8.5 it results with error
> 
> Can't load the 
> /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/Win32/ODBC/ODBC.dll 
> for module Win32/ODBC: dlopen: Win32 error 126 at 
> /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/Dynaloader.pm 
> line 230
> 
> 
> 
> Please, can you send a piece of advice to me?

My advice is to not try to mix and marry Cygwin Perl and ActiveState 
Perl (assuming that is where you are getting Win32::ODBC from?).  Not 
only are you going to have the problems you speak of above, but you are 
going to have other pathing issues as well (Cygwin/Unix style paths vs. 
Windows paths with drive names).  This has been my experience anyway.

My personal solution to this, since both Perls are actually native Win32 
images, is to place a symlink in /usr/bin under Cygwin that points to 
ActiveState Perl and use THAT in my Perl scripts under Cygwin that 
require specific Win32 capabilities:

$ ln -sn /cygdrive/c/perl/bin/perl.exe /usr/bin/winperl.exe
$ winperl -v
 ...blah, blah, blah version information from AS Perl...
$ perl -v
 ...blah, blah, blah version information from Cygwin Perl...

Then begin all Cygwin Perl scripts that require Win32 modules with:

#!/usr/bin/winperl -w

The caveat with this is that AS Perl, even under Cygwin, still wants 
Windows style pathings (eg. with drive letters, "\" etc.) whereas Cygwin 
Perl expects Unix style pathings (eg. "/").  Not to mention your 
she-bang is a little non-conventional.  But the plus to the she-bang is 
since AS Perl doesn't use the she-bang line (except to pick up options 
like -w), then scripts written using 'winperl' work well at both the 
Cygwin shell prompt as well as a regular Win32 Command Prompt window.

The symlink hack will also solve your version discrepancies as well 
between the two versions.  (I, for instance, am running AS Perl v5.8.3 
and Cygwin Perl v5.8.2).  I've found this to work best.  YMMV.

HTH,
-ceo


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

Date: Mon, 23 Aug 2004 19:07:24 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: finding directory sizes
Message-Id: <MfrWc.304228$%_6.138549@attbi_s01>

Zebee Johnstone wrote:

> In comp.lang.perl.misc on Mon, 23 Aug 2004 07:44:31 GMT
> Joe Smith <Joe.Smith@inwap.com> wrote:

>>Use the global $prune variable.
> 
> Where is that documented?

It matches the option by the same name in /usr/bin/find.  See the
man page for 'find'.  (A bit of history: The perl script find2perl
accepts the same command line arguments as /usr/bin/find, and
outputs a perl script to impliment that command.)

   /usr/bin/find / -fstype nfs -prune -o -name 'tmp' -prune -o -print

> Does it exclude files or just directories, or whatever's matched by 
> the regexp?

File::Find calls the 'wanted' function for everything it comes across.
After your wanted() function returns, if the thing being looked at
is a directory, File::Find will process that directory recursively
unless $prune is set.  Setting $prune while looking at a plain file
does nothing.  Setting $prune while looking at a directory says to
pretend that the directory is empty.
	-Joe


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

Date: Mon, 23 Aug 2004 19:59:12 GMT
From: Zebee Johnstone <zebee@zip.com.au>
Subject: Re: finding directory sizes
Message-Id: <slrncikiq6.kva.zebee@zeus.zipworld.com.au>

In comp.lang.perl.misc on Mon, 23 Aug 2004 14:21:13 GMT
Jürgen Exner <jurgenex@hotmail.com> wrote:
> Did you look at the documentation and examples that come with File::Find?
> 

Yes.  And found I couldn't understand it.  As in I could read the words
but there were things missing or pre-requisite knowledge I was expected
to have, such as "prune" that I didn't have.

Zebee


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

Date: Mon, 23 Aug 2004 17:58:46 GMT
From: "Hmmm..." <blahblah@blah.com>
Subject: Formmail.pl - Sendmail vs. Smtp
Message-Id: <qfqWc.1022$fb.596@trnddc03>

I am setting up a web site for a friend.  Her hosting service does not
support Sendmail.  It is an NT server.  They recommend I use Smtp.  I have
been using something like formmail.pl when I have been helping friends set
up their web sites.  Does anyone know of a perl script that works like
formmail.pl, but uses Smtp.  Thanks.




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

Date: Mon, 23 Aug 2004 14:06:25 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Formmail.pl - Sendmail vs. Smtp
Message-Id: <gu2dneIBlsK_r7fcRVn-iw@adelphia.com>

Hmmm... wrote:

> I am setting up a web site for a friend.  Her hosting service does not
> support Sendmail.  It is an NT server.  They recommend I use Smtp.  I have
> been using something like formmail.pl when I have been helping friends set
> up their web sites.

Matt Wright's formmail.pl? On Windows NT?

Ye Gods man, if that's what you do to your friends, what do you do to 
your *enemies*?

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Mon, 23 Aug 2004 20:16:17 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Formmail.pl - Sendmail vs. Smtp
Message-Id: <2ouqhmFf2i3pU1@uni-berlin.de>

Hmmm... wrote:
> I am setting up a web site for a friend.  Her hosting service does
> not support Sendmail.  It is an NT server.  They recommend I use
> Smtp.  I have been using something like formmail.pl when I have
> been helping friends set up their web sites.  Does anyone know of a
> perl script that works like formmail.pl, but uses Smtp.

     http://nms-cgi.sourceforge.net/scripts.shtml

(can be configured either way)

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


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

Date: Mon, 23 Aug 2004 19:27:57 GMT
From: Chris <ceo@nospan.on.net>
Subject: Re: Formmail.pl - Sendmail vs. Smtp
Message-Id: <1zrWc.5886$Y94.2590@newssvr33.news.prodigy.com>

Hmmm... wrote:
> I am setting up a web site for a friend.  Her hosting service does not
> support Sendmail.  It is an NT server.  They recommend I use Smtp.  I have
> been using something like formmail.pl when I have been helping friends set
> up their web sites.  Does anyone know of a perl script that works like
> formmail.pl, but uses Smtp.  Thanks.

If these are really your friends, and you are really trying to help 
them, then DON'T use formmail.pl to process their mail.  Just DON'T. 
Especially if it's Matt Wright's formmail.pl.

Write a real (secure) script that uses Net::SMTP or the many other variants.

-ceo


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

Date: 23 Aug 2004 16:19:41 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to randomize foreach
Message-Id: <cgd5et$o5f$1@mamenchi.zrz.TU-Berlin.DE>

Gunnar Hjalmarsson  <noreply@gunnar.cc> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> > One time-linear shuffler swaps list elements instead of extracting
> > them.  That saves the time splice needs to shift the array tight:
> > 
> >     sub swapping {
> >         for ( reverse 1 .. $#_ ) {
> >             my $r = rand( 1 + $_);
> >             @_[ $r, $_] = @_[ $_, $r];
> >         }
> >         @_;
> >     }
> > 
> > Benchmarking this against
> > 
> >     sub splicing {
> >         map splice( @_, rand $_, 1), reverse 1 .. @_;
> >     }
> > 
> > shows splicing() about twice as fast for arrays shorter than 1000.
> > The break-even point is with lists of length 12_000; from then on
> > swapping() wins out by an increasing margin. At 30_000, swapping is
> > twice as fast as splicing.  On my machine.
> 
> The benchmark I posted showed that the execution time of
> List::Util::shuffle() is much faster than that. Is the explanation,
> then, that I was actually comparing apples and oranges, since
> List::Util is a compiled module?

It is.  It also contains a pure Perl implementation, but by default it
loads an XS version.  That's why I wanted to add a benchmark against
a Perl implementation of the in-place shuffle.

Anno


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

Date: 23 Aug 2004 16:39:38 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to randomize foreach
Message-Id: <cgd6ka$paq$1@mamenchi.zrz.TU-Berlin.DE>

Tassilo v. Parseval <tassilo.parseval@post.rwth-aachen.de> wrote in comp.lang.perl.misc:
> Also sprach Sam Holden:
> 
> > On 23 Aug 2004 07:27:36 GMT, Abigail <abigail@abigail.nl> wrote:
> >> Matthew Braid (mb@uq.net.au.invalid) wrote on MMMMX September MCMXCIII in
> >><URL:news:cgbd5q$j40$1@bunyip.cc.uq.edu.au>:
> >> ''  
> >> ''  Odd. I just tried the same thing (well, I added a third option - sort 
> >> ''  {int(rand(3)) - 1} @arr - to double check:
> >>
> >> I've seen variations of the third option before, being presented as a
> >> way to shuffle a list. But I've yet to see any proof that this gives a
> >> fair shuffle (fair being every possible permutation of the list has the
> >> same chance of being produced, given a truely random 'rand()' function).
> > 
> > Clearly it doesn't. Consider the simple case of a two element list (a,b).
> > There are two possible shuffle results: (a,b) and (b,a) each of which will
> > have equal probability of occuring in a fair shuffle.
> > 
> > Any sane implementation of sort will when asked to sort a two element list
> > do a single comparison, so for the above there are three cases:
> > 
> > 	(int(rand(3)) -1)==-1 -> (a,b)
> > 	(int(rand(3)) -1)==0  -> (a,b)
> > 	(int(rand(3)) -1)==1  -> (b,a)
> > 
> > Clearly the shuffle isn't fair since (a,b) is twice as likely. Of course
> > it might improve with a larger list, but it doesn't bode well when the
> > algorithm fails for such a simple case.
> 
> The naive solution to that would be disallowing '0' so that pairs are
> always swapped.
> 
> However, this wont make the shuffling fair either. One problem (which
> can be verified with some simple empirical tests), is that the fairness
> depends on the algorithm used.
> 
> Taking this little program:

[interesting results snipped]

One problem with this approach is that it violates the assumptions of
the underlying algorithm.  Sort procedures assume that comparisons are
consistent with a linear ordering of the list elements.  In particular,
they assume that comparing the same elements twice will have the same
outcome, but also transitivity of the order relation and more.  Who
is to say what a sort algorithm is going to do?  It may not even halt,
for instance if the random decisions indicate a cyclic ordering.

Nor are any predictions on running time valid, so the expectation
that it runs in n*log n time may not be true.  Since that is worse
than the linear time of an in-place shuffle, there isn't much to
recommend the "random sort" at all.

Anno


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

Date: 23 Aug 2004 18:24:42 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: How to randomize foreach
Message-Id: <slrncikdja.q3p.abigail@alexandra.abigail.nl>

Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMMMX September
MCMXCIII in <URL:news:cgd5et$o5f$1@mamenchi.zrz.TU-Berlin.DE>:
||  Gunnar Hjalmarsson  <noreply@gunnar.cc> wrote in comp.lang.perl.misc:
|| > Anno Siegel wrote:
|| > > One time-linear shuffler swaps list elements instead of extracting
|| > > them.  That saves the time splice needs to shift the array tight:
|| > > 
|| > >     sub swapping {
|| > >         for ( reverse 1 .. $#_ ) {
|| > >             my $r = rand( 1 + $_);
|| > >             @_[ $r, $_] = @_[ $_, $r];
|| > >         }
|| > >         @_;
|| > >     }
|| > > 
|| > > Benchmarking this against
|| > > 
|| > >     sub splicing {
|| > >         map splice( @_, rand $_, 1), reverse 1 .. @_;
|| > >     }
|| > > 
|| > > shows splicing() about twice as fast for arrays shorter than 1000.
|| > > The break-even point is with lists of length 12_000; from then on
|| > > swapping() wins out by an increasing margin. At 30_000, swapping is
|| > > twice as fast as splicing.  On my machine.
|| > 
|| > The benchmark I posted showed that the execution time of
|| > List::Util::shuffle() is much faster than that. Is the explanation,
|| > then, that I was actually comparing apples and oranges, since
|| > List::Util is a compiled module?
||  
||  It is.  It also contains a pure Perl implementation, but by default it
||  loads an XS version.  That's why I wanted to add a benchmark against
||  a Perl implementation of the in-place shuffle.


So, it's fair to compare a splice who is doing its work in C with a
shuffle written in pure Perl?

I'd say comparing the XS shuffle with the C splice is more fair.



Abigail
-- 
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
 |perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
 |perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
 |perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;


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

Date: 23 Aug 2004 17:09:34 -0400
From: Scott W Gifford <gifford@umich.edu>
Subject: Re: How to randomize foreach
Message-Id: <qszsmadr27l.fsf@asteroids.gpcc.itd.umich.edu>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:

[...]

> One problem with this approach is that it violates the assumptions of
> the underlying algorithm.  Sort procedures assume that comparisons are
> consistent with a linear ordering of the list elements.  In particular,
> they assume that comparing the same elements twice will have the same
> outcome, but also transitivity of the order relation and more.  Who
> is to say what a sort algorithm is going to do?  It may not even halt,
> for instance if the random decisions indicate a cyclic ordering.

Indeed, the documentation for Perl's sort function says:

    The comparison function is required to behave.  If it returns
    inconsistent results (sometimes saying $x[1] is less than $x[2]
    and sometimes saying the opposite, for example) the results are
    not well-defined.

-----ScottG.


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

Date: 23 Aug 2004 08:58:48 -0700
From: suchintya_p@yahoo.com (suchintya)
Subject: Net::SMTP and attachments
Message-Id: <883a2694.0408230758.20622cc4@posting.google.com>

Is there a way to send attachments through the NET::SMTP module? If so
where can I find any sample code/documentation

Thanks


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

Date: Mon, 23 Aug 2004 17:58:26 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Net::SMTP and attachments
Message-Id: <2ouitjFes8vfU1@uni-berlin.de>

suchintya wrote:
> Is there a way to send attachments through the NET::SMTP module? If
> so where can I find any sample code/documentation

There are other modules that you may want to check out instead, such
as Mail::Sender. Its docs include lots of examples.

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


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

Date: Mon, 23 Aug 2004 11:07:25 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Net::SMTP and attachments
Message-Id: <87acwlhm82.fsf@limey.hpcc.uh.edu>

>> On 23 Aug 2004 08:58:48 -0700,
>> suchintya_p@yahoo.com (suchintya) said:

> Is there a way to send attachments through the NET::SMTP
> module? If so where can I find any sample code/documentation

Sounds like a lot of hard work and wheel-reinventing.

Try MIME::Lite instead.

  http://search.cpan.org/

hth
t


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

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 6901
***************************************


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