[23943] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6144 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 17 00:05:38 2004

Date: Mon, 16 Feb 2004 21:05:06 -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           Mon, 16 Feb 2004     Volume: 10 Number: 6144

Today's topics:
    Re: [MIME] How to attach eMails? (James Willmore)
        [root@localhost sec]# alien -r perl-modules_5.8.3-2_all <alan@asandco.co.uk>
    Re: [root@localhost sec]# alien -r perl-modules_5.8.3-2 <usenet@morrow.me.uk>
        Checking versions on the command line (David Morel)
    Re: Checking versions on the command line <jwillmore@remove.adelphia.net>
    Re: Checking versions on the command line <kalinaubears@iinet.net.au>
    Re: Checking versions on the command line <tadmc@augustmail.com>
    Re: compile Perl as a STATIC library <kalinaubears@iinet.net.au>
    Re: do not reload <wksmith@optonline.net>
    Re: do not reload <jurgenex@hotmail.com>
    Re: do not reload (Sam Holden)
    Re: do not reload <jurgenex@hotmail.com>
    Re: do not reload <uri@stemsystems.com>
    Re: dup remove - why/how does this work - NEWBIE <usenet@morrow.me.uk>
    Re: dup remove - why/how does this work - NEWBIE <tony_curtis32@_SPAMTRAP_yahoo.com>
    Re: dup remove - why/how does this work - NEWBIE <ebohlman@earthlink.net>
    Re: dup remove - why/how does this work - NEWBIE <tony_curtis32@_SPAMTRAP_yahoo.com>
    Re: dup remove - why/how does this work - NEWBIE <spam@thecouch.homeip.net>
    Re: extract parts of file - newbie <tadmc@augustmail.com>
    Re: extract parts of file - newbie (Jay Tilton)
    Re: How to read STDERR messages from a third party prog <Joe.Smith@inwap.com>
    Re: more stripping <tadmc@augustmail.com>
    Re: Recommended mail module for plaintext sending? <jwillmore@remove.adelphia.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 16 Feb 2004 16:40:16 -0800
From: jwillmore@myrealbox.com (James Willmore)
Subject: Re: [MIME] How to attach eMails?
Message-Id: <d61170e5.0402161640.276df4f7@posting.google.com>

Guru03 <Guru03@despammed.com> wrote in message news:<Xns9491B2A5B5F52Guru03despammedcom@193.43.96.1>...
> James Willmore <jwillmore@remove.adelphia.net> wrote in 
> news:pan.2004.02.16.13.53.13.924363@remove.adelphia.net:
> 
> > I personally use MIME::Lite
> 
> Ok, but I must return a MIME::Entity object...

No, you don't - that's the beauty of using MIME::Lite - no sendmail required :-)  

Jim
(jwillmore _at_ adelphia _dot_ net)


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

Date: Tue, 17 Feb 2004 00:21:29 +0000
From: Alan secker <alan@asandco.co.uk>
Subject: [root@localhost sec]# alien -r perl-modules_5.8.3-2_all.deb perl-modules_5.8.3-2.rpm
Message-Id: <c0rmom$bp$1@news.freedom2surf.net>

 Alien Problem re perl-modules-5.8.3-3

Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I need to generate an rpm from a deb.

alien -r perl-modules_5.8.3-2_all.deb perl-modules_5.8.3-2.rpm

generates the follwing error:

error: Couldn't exec /usr/lib/rpm/filter.sh: No such file or directory

getOutputFrom(): Broken pipe

I cannot locate a filter.sh that makes any sense. I installed 
perl-filter-1.28-139.rpm but that hasn't helped.

If this makes any sense to a passing reader, I would appreciate your 
comments.

TIA

Alan




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

Date: Tue, 17 Feb 2004 01:25:12 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: [root@localhost sec]# alien -r perl-modules_5.8.3-2_all.deb perl-modules_5.8.3-2.rpm
Message-Id: <c0rqho$49t$1@wisteria.csv.warwick.ac.uk>


Alan secker <alan@asandco.co.uk> wrote:
>  Alien Problem re perl-modules-5.8.3-3
> 
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit

What are these doing here?

> I need to generate an rpm from a deb.

You will have more luck enquiring on a Mandrake mailing list about
this sort of thing.

Ben

-- 
"The Earth is degenerating these days. Bribery and corruption abound.
Children no longer mind their parents, every man wants to write a book,
and it is evident that the end of the world is fast approaching."
     -Assyrian stone tablet, c.2800 BC                         ben@morrow.me.uk


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

Date: 16 Feb 2004 20:01:34 -0800
From: altalingua@hotmail.com (David Morel)
Subject: Checking versions on the command line
Message-Id: <60c4a7b1.0402162001.190c7506@posting.google.com>

Hi,

What are the command lines that you use to check the version of perl
you have, and to check the version of a particular module? Thanks.


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

Date: Mon, 16 Feb 2004 23:54:12 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Checking versions on the command line
Message-Id: <pan.2004.02.17.04.54.11.671117@remove.adelphia.net>

On Mon, 16 Feb 2004 20:01:34 -0800, David Morel wrote:

> What are the command lines that you use to check the version of perl
> you have, and to check the version of a particular module? Thanks.

perl -v 
and
perl -Mname_of_module -e 'print "$name_of_module::VERSION\n"'

-- 
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 ...
Radioactive cats have 18 half-lives. 




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

Date: Tue, 17 Feb 2004 15:49:36 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Checking versions on the command line
Message-Id: <40319e60$0$22526$5a62ac22@freenews.iinet.net.au>

David Morel wrote:
> Hi,
> 
> What are the command lines that you use to check the version of perl
> you have, and to check the version of a particular module? Thanks.

perl -e 'print $]'
perl -MModule::Name -le 'print $Module::Name::VERSION'

Cheers,
Rob

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



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

Date: Mon, 16 Feb 2004 22:29:22 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Checking versions on the command line
Message-Id: <slrnc33652.1fn.tadmc@magna.augustmail.com>

David Morel <altalingua@hotmail.com> wrote:

> What are the command lines that you use to check the version of perl
> you have, 


   perl --version


> and to check the version of a particular module? 


Include the module, and output its $VERSION package variable:

   perl -mLWP::Simple -e 'print $LWP::Simple::VERSION'


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 17 Feb 2004 11:58:44 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: compile Perl as a STATIC library
Message-Id: <40316844$0$22516$5a62ac22@freenews.iinet.net.au>

Torsten Mohr wrote:
> Hi,
> 
> 
>>If they're perl scripts, then use PAR to build them into executables and
>>distribute those executables with the perl58.dll. (No need to distribute
>>the modules as well.)
> 
> 
> That's the point, i don't want to ship an external perl58.dll, i
> want it as a static lib.
> 
> On Linux i have a "libperl.a", why isn't this possible on Win32?
> 

It's probably possible on Win32 - I just haven't heard of anyone having 
done it - which leads to me think it may well be quite difficult.

I don't feel confident that *I* would be able to acieve this without 
step-by-step instructions.

Perhaps someone on ActiveState's perl-win32-users mailing list can 
provide some assistance/advice .... or maybe someone on the PAR mailing 
list (though this is not really on-topic for either of those lists).

Cheers,
Rob


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



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

Date: Tue, 17 Feb 2004 00:27:32 GMT
From: "Bill Smith" <wksmith@optonline.net>
Subject: Re: do not reload
Message-Id: <UddYb.20708$cE3.24920891@news4.srv.hcvlny.cv.net>


<anonymous@coolgroups.com> wrote in message
news:ad589dc795c762bb4df7a900557f7afe@news.scbiz.com...
> How do I make sure that a perl CGI page doesn't get reloaded
> when the user hits the back button and goes to it?  I've
> tried outputting the "Expires" header, but that doesn't seem
> to do the trick.
>

I have had this problem and I think I understand it.

When your user selects his browser's "BACK" button, the browser usually
displays a local copy of the previous page rather than requesting an
update from the server.  You probably cannot change this behavior.

 I have worked around the problem by providing a button (usually called
"PREV") which does what you intend.  I turned out that it was often
useful to have both options available.


--


Good Luck,
Bill




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

Date: Tue, 17 Feb 2004 03:37:55 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: do not reload
Message-Id: <n0gYb.34405$1S1.32085@nwrddc01.gnilink.net>

anonymous@coolgroups.com wrote:
> I want the user to be able to go back to a previous page.  I
> just don't want the page to reload.

Page? The programming language Perl does not have the notion of a "page".
What are you talking about?

jue




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

Date: 17 Feb 2004 03:53:46 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: do not reload
Message-Id: <slrnc3342a.cl.sholden@flexal.cs.usyd.edu.au>

On Tue, 17 Feb 2004 03:37:55 GMT, Jürgen Exner <jurgenex@hotmail.com> wrote:
> anonymous@coolgroups.com wrote:
>> I want the user to be able to go back to a previous page.  I
>> just don't want the page to reload.
> 
> Page? The programming language Perl does not have the notion of a "page".
> What are you talking about?

It certainly does have the notion of a "page":

perldoc perlform
perldoc -f write

:)

-- 
Sam Holden


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

Date: Tue, 17 Feb 2004 04:01:10 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: do not reload
Message-Id: <amgYb.34433$1S1.9416@nwrddc01.gnilink.net>

Sam Holden wrote:
> On Tue, 17 Feb 2004 03:37:55 GMT, Jürgen Exner <jurgenex@hotmail.com>
> wrote:
>> anonymous@coolgroups.com wrote:
>>> I want the user to be able to go back to a previous page.  I
>>> just don't want the page to reload.
>>
>> Page? The programming language Perl does not have the notion of a
>> "page". What are you talking about?
>
> It certainly does have the notion of a "page":
>
> perldoc perlform
> perldoc -f write

Oooops, you got me.

Now, can you un-"write" a "perlform" to "go back to the previous page"?

jue




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

Date: Tue, 17 Feb 2004 04:07:00 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: do not reload
Message-Id: <x7znbiz6vv.fsf@mail.sysarch.com>

>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:

  JE> Sam Holden wrote:
  >> On Tue, 17 Feb 2004 03:37:55 GMT, Jürgen Exner <jurgenex@hotmail.com>
  >> wrote:
  >>> anonymous@coolgroups.com wrote:
  >>>> I want the user to be able to go back to a previous page.  I
  >>>> just don't want the page to reload.
  >>> 
  >>> Page? The programming language Perl does not have the notion of a
  >>> "page". What are you talking about?
  >> 
  >> It certainly does have the notion of a "page":
  >> 
  >> perldoc perlform
  >> perldoc -f write

  JE> Oooops, you got me.

  JE> Now, can you un-"write" a "perlform" to "go back to the previous page"?

sure! just close the file, and reopen it with File::ReadBackwards and
use the page delimiter. then you could do a tell call and reopen the
file, seek to that point and truncate it. congrats, you just unwrote a
page!

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 16 Feb 2004 23:49:10 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: dup remove - why/how does this work - NEWBIE
Message-Id: <c0rktm$bu$1@wisteria.csv.warwick.ac.uk>


Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com> wrote:
> >> On 16 Feb 2004 13:44:10 -0800,
> >> jason@cyberpine.com said:
> 
> > The below simple code works at removing dups from a 20k
> > record file.  Looking for somebody to explain how/why.
> 
> It's not even close, I'm afraid.

Well, it solves the problem asked. Yes, it has problems, but...

> You'll probably want to chomp() the lines too, since the
> trailing newline sequence is usually part of the file
> representation, not part of the data content per se.

In this case it isn't necessary: the lines are being compared for
uniquness, so the line with the $/ on the end is just as good as
without. Think before you say things like this.

> > foreach $key (@lines){
> >  $lines{$key} = 1;
> > }
> > @lines = keys(%lines);
> > print @lines;
> 
> > I understand I am adding a key = 1 to every line (is it to
> > every line?), but when we recreate @lines what exactly is
> 
> "Adding" is a misleading word here, implying that the value of
> the line is being changed.  "Associating" would be closer.

Indeed. The important point, though, is that each key can only go into
the hash once.

> > keys(%lines) doing/saying? I see that %lines contains
> > 1+unique records in the file).
> 
> Using a hash is the right choice here, but see
> 
>     perldoc -q duplicate
> 
> Essentially you want to, for each line, output the line only
> if you haven't seen that same line before (i.e. it's not th
> key of a hash).

Yes, another WTDI would be to print the lines as you go along: this is
more parsimonious, and outputs the lines in the original order.

while (<F>) {
    print unless $lines{$_};
    $lines{$_} = 1;
}

This doesn't mean that the script as given is wrong, however.

Ben

-- 
$.=1;*g=sub{print@_};sub r($$\$){my($w,$x,$y)=@_;for(keys%$x){/main/&&next;*p=$
$x{$_};/(\w)::$/&&(r($w.$1,$x.$_,$y),next);$y eq\$p&&&g("$w$_")}};sub t{for(@_)
{$f&&($_||&g(" "));$f=1;r"","::",$_;$_&&&g(chr(0012))}};t    # ben@morrow.me.uk
$J::u::s::t, $a::n::o::t::h::e::r, $P::e::r::l, $h::a::c::k::e::r, $.


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

Date: Mon, 16 Feb 2004 17:55:46 -0600
From: Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com>
Subject: Re: dup remove - why/how does this work - NEWBIE
Message-Id: <87ptcetw8t.fsf@limey.hpcc.uh.edu>

>> On Mon, 16 Feb 2004 23:49:10 +0000 (UTC),
>> Ben Morrow <usenet@morrow.me.uk> said:

>> Me:
>> You'll probably want to chomp() the lines too, since the
>> trailing newline sequence is usually part of the file
>> representation, not part of the data content per se.

> In this case it isn't necessary: the lines are being
> compared for uniquness, so the line with the $/ on the end
> is just as good as without. Think before you say things like
> this.

Oh, I thought about it :-)

The OP posted similar code before that did something slightly
different.  It all depends on what is meant to happen later,
this small example is almost certainly mot the full story.
Which is why I qualified the suggestion ("probably").

For myself, I'd rather lose the newline as it's read; this way
I have a canonicalised internal representation of my data
immediately.  The newline is a sequence that serves to
separate individual data units in a serialisation of the data,
so away it goes.





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

Date: 17 Feb 2004 00:33:45 GMT
From: Eric Bohlman <ebohlman@earthlink.net>
Subject: Re: dup remove - why/how does this work - NEWBIE
Message-Id: <Xns9491BD44490BEebohlmanomsdevcom@130.133.1.4>

Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com> wrote in 
news:87ptcetw8t.fsf@limey.hpcc.uh.edu:

> For myself, I'd rather lose the newline as it's read; this way
> I have a canonicalised internal representation of my data
> immediately.  The newline is a sequence that serves to
> separate individual data units in a serialisation of the data,
> so away it goes.

Except the only thing the OP needed to do with the data was print (part of) 
it out again, which means he'd just have to put the newlines back anyway.  
IOW, he's not working with his lines as abstract data, just as pure 
representations of the serialized form.


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

Date: Mon, 16 Feb 2004 18:35:56 -0600
From: Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com>
Subject: Re: dup remove - why/how does this work - NEWBIE
Message-Id: <87smhalez7.fsf@limey.hpcc.uh.edu>

>> On 17 Feb 2004 00:33:45 GMT,
>> Eric Bohlman <ebohlman@earthlink.net> said:

> Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com> wrote in
> news:87ptcetw8t.fsf@limey.hpcc.uh.edu:

>> For myself, I'd rather lose the newline as it's read; this
>> way I have a canonicalised internal representation of my
>> data immediately.  The newline is a sequence that serves to
>> separate individual data units in a serialisation of the
>> data, so away it goes.

> Except the only thing the OP needed to do with the data was
> print (part of) it out again, which means he'd just have to
> put the newlines back anyway.  IOW, he's not working with
> his lines as abstract data, just as pure representations of
> the serialized form.

Possibly.  But we don't know for sure do we?

Do it or don't do it; whichever is best for the situation...


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

Date: Mon, 16 Feb 2004 23:52:57 -0500
From: Mina Naguib <spam@thecouch.homeip.net>
Subject: Re: dup remove - why/how does this work - NEWBIE
Message-Id: <N6hYb.84470$gi7.1407320@weber.videotron.net>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1


Ben Morrow wrote:
> while (<F>) {
>     print unless $lines{$_};
>     $lines{$_} = 1;
> }

Not for the clarity-seekers (or good-coding-standards learning 
purposes), but the whole script can be summarized to:

#!/usr/bin/perl -n

print unless $seen{$_}++;

-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAMZ4ueS99pGMif6wRAk7AAKD0qZKmQLr0/9ovvsXFG9YQRU2iNwCghRBg
X7eM2zh8SnOjedrZd/7erIE=
=zdHW
-----END PGP SIGNATURE-----


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

Date: Mon, 16 Feb 2004 17:46:28 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: extract parts of file - newbie
Message-Id: <slrnc32lij.4ne.tadmc@magna.augustmail.com>

jason@cyberpine.com <jason@cyberpine.com> wrote:

> New to Perl 


We can tell that from the code.  :-)


> open (FILE,"$db"); 


You should not quote a lone variable.

You should always, yes *always*, check the return value from open():

    open(FILE, $db) or die "could not open '$db' $!";


> @LINES=<FILE>; 
> close(FILE); 
> $SIZE=@LINES; 
> print $SIZE,"\n";
> for ($i=0;$i<=$SIZE;$i++) 
> { 
>    $_=$LINES[$i]; 


Phew!

Don't read it ALL into memory only to process it line-by-line,
just read and process a line at a time.

If you do that, you can replace that whole chunk of code with just this:

   while ( <FILE> ) {


>    if (/motion/i)
>    {print "$_";}
            ^  ^
            ^  ^ more useless quotes, remove them
> } 
> 
> 
> How can I extract:
> 
> 1. 5 lines before and after the string


Oh. _Now_ you might want them all in an array.  :-)

   foreach my $index ( $i - 5 .. $i + 5 ) {
      print $LINES[$index];
   }

Or you could use an "array slice" (see perldata.pod):

   print @LINES[ $i - 5 .. $i + 5 ];


What do you want to do if the matched line is in the first or
last 5 lines? ...

You could still process line-by-line if you maintained a 5-line buffer
of the previous lines.


> 2. Columns positions 5-15 (for all selected)


   print substr($_, 4, 11), "\n" if /motion/i;


> 3. Limit selection to rows 5000-7000


   my @selected = @LINES[ 5000 .. 7000 ];


> 4. The last 5 lines of the entire file


   print @LINES[ $#LINES-4 .. $#LINES ];


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 17 Feb 2004 00:05:17 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: extract parts of file - newbie
Message-Id: <40315a27.7041175@news.erols.com>

jason@cyberpine.com wrote:

: Hello. New to Perl and trying to figure out if beter way to do the
: following (in Active State Perl under Windows 2000):
: 
: I have this DOS text file with about 20,000 lines. In the simple
: example below I can extract lines that contain a particular string.
: 
: $db = "work.txt"; 
: open (FILE,"$db"); 
: @LINES=<FILE>; 
: close(FILE); 
: $SIZE=@LINES; 
: print $SIZE,"\n";
: for ($i=0;$i<=$SIZE;$i++) 
: { 
:    $_=$LINES[$i]; 
:    if (/motion/i)
:    {print "$_";}
: } 

You've committed several novice mistakes there.
1. Using package variables instead of lexicals.
2. Quoting "$vars"
3. Not checking the return from open() for success.
4. Slurping an entire file to perform line-by-line processing.
5. Iterating across an array's indeces instead of iterating across its
elements.

Sequentially processing the records in a file is such a common task that
you should learn the Perlish way of doing it.

    my $db = "work.txt"; 
    open (FILE, '<', $db) or die "Cannot open '$db' for read:$!";
    while(<FILE>) {
        print if /motion/i;
    }

: How can I extract:
: 
: 1. 5 lines before and after the string

Store the previous five lines in an array.  When your program recognizes
the desired record, have it output the contents of this buffer and note
that it should output the next five records.

: 2. Columns positions 5-15 (for all selected)

The substr() function will do that.  See perlfunc.

: 3. Limit selection to rows 5000-7000

The '..' range operator is imbued with special juju for that purpose.
See perlop.

: 4. The last 5 lines of the entire file

The buffer implemented for requirement 1 can be made to handle that as
well.
 
Altogether, the program might go like:

    #!perl
    use warnings;
    use strict;
    my $db = 'work.txt';
    open my $fh, '<', $db or die "Cannot open '$db' for read: $!";
    my (@w, $n);
    while (<$fh>) {
        push @w, substr($_,5,11); # requirement 2
        $n=6
            if 5000 .. 7000 # requirement 3
            and /motion/;
        if($n) {
            print @w;
            @w = ();
            $n--;
        }
        else {
            splice @w, 0, -5; # limit window to five previous records
        }
    }
    print @w; # requirement 4



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

Date: Tue, 17 Feb 2004 02:27:54 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: How to read STDERR messages from a third party program?
Message-Id: <K_eYb.44229$yE5.186874@attbi_s54>

Arne Goetje wrote:

> background and capture the messages it sends out onto STDERR

That's an FAQ.

    perldoc -q stderr

Look at IPC::Open3.


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

Date: Mon, 16 Feb 2004 17:18:34 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: more stripping
Message-Id: <slrnc32jua.4ne.tadmc@magna.augustmail.com>

Michael Hill <hillmw@ram.lmtas.lmco.com> wrote:
                         ^^^^^^^^^^^^^^
                         ^^^^^^^^^^^^^^ I worked there for 12 years
> This is where I am:

> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});


You are in a bad place, and I don't mean Lockheed Martin.  :-)

Hand rolled "parsing" of form data is very easy to get wrong.

Let a module, such as CGI.pm, handle all of that for you.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 17 Feb 2004 00:04:29 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Recommended mail module for plaintext sending?
Message-Id: <pan.2004.02.17.05.04.25.356117@remove.adelphia.net>

On Mon, 16 Feb 2004 14:21:22 +0000, Ian.H wrote:

> There are many mail modules on CPAN.. but are any recommended over others
> for sending mails? This only needs to be simple and send plaintext mails
> only. The lighter the module the better. I could do this direct with
> IO::Socket but a light-weight module would be nicer =)

I've had excellent results with Net::SMTP.  Plus, the Debug option for the
module has saved me numerous times when trying to get something to work
(usually, the human interface is at fault :-( ).

I've also used MIME::Lite to send email with MIME attachments with good
results.

I've only used Mail::Sender on rare occasions.

-- 
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 ...
"I do not fear computers.  I fear the lack of them."   -- Isaac
Asimov 



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

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


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