[16662] in Perl-Users-Digest
Perl-Users Digest, Issue: 4074 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 20 21:10:37 2000
Date: Sun, 20 Aug 2000 18:10:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966820216-v9-i4074@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 20 Aug 2000 Volume: 9 Number: 4074
Today's topics:
Opening new processes... <superman183@hotmail.com>
Re: Opening new processes... (Clinton A. Pierce)
Re: Opening new processes... (Martien Verbruggen)
Re: Out of memory! error. Working with arrays... (Alan Barclay)
Re: perl5.6 new reg-ex errors (but only when you're on (Ilya Zakharevich)
rookie question: comparing text string to directory con <NIXSPAMdrh@engineer.com>
Re: rookie question: comparing text string to directory <jeffp@crusoe.net>
Re: rookie question: comparing text string to directory <bwalton@rochester.rr.com>
Script skipping a section!?!? <musicfan@punitiveart.com>
Re: Script skipping a section!?!? <tony_curtis32@yahoo.com>
Serial port ??? <dbucher@horus.ch>
Re: Sorting is very slow <jpl@research.att.com>
Re: Sorting is very slow (Abigail)
Re: subject with smtp.pm <abe@ztreet.demon.nl>
Re: subject with smtp.pm <danielxx@bart.nl>
Re: subject with smtp.pm <tony_curtis32@yahoo.com>
Re: Web Solution Needed - Please respond (Homer Simpson)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 20 Aug 2000 14:36:17 -0400
From: "Dave" <superman183@hotmail.com>
Subject: Opening new processes...
Message-Id: <39a02631_3@news1.prserv.net>
Hi,
I have a perl script which I want to kick off several other processes, each
of which will create a file, which in turn the parent script will process
when all the files have been created. Each child process takes about six or
seven seconds to complete, so it's better to kick them off all at once
rather than wait for each process to complete before kicking off the next
one....anyway, I don't seem able to get it working the way in which I want:
I have a script similar to the one below, which is kicked off by another
process:
#!/usr/bin/perl
print "about to make request 1...\n\n";
open(FN,"|perl ../123/myshell1.pl > /dev/null 2>&1");
print "about to make request 2...\n\n";
open(FN,"|perl ../123/myshell2.pl > /dev/null 2>&1");
print "about to make request 3...\n\n";
open(FN,"|perl ../123/myshell3.pl > /dev/null 2>&1");
exits.....
but each new process is only kicked off when the previous one has finished,
where what I really want is for them all to be kicked off just about at the
same time without waiting for the previous one to complete. I'm not
especially hot on Perl or Unixy things, but I'm sure that it must be
possible to do this, so hoping very much that someone can assist. Many
thanks....Dave
------------------------------
Date: Sun, 20 Aug 2000 20:58:27 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Opening new processes...
Message-Id: <TDXn5.5640$QW4.86908@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <39a02631_3@news1.prserv.net>,
"Dave" <superman183@hotmail.com> writes:
> [...] Each child process takes about six or
> seven seconds to complete, so it's better to kick them off all at once
> rather than wait for each process to complete before kicking off the next
> one....anyway, I don't seem able to get it working the way in which I want:
> [...]
> but each new process is only kicked off when the previous one has finished,
> where what I really want is for them all to be kicked off just about at the
> same time without waiting for the previous one to complete. I'm not
> especially hot on Perl or Unixy things,
Hmm...quite possible. You need to investigate fork(). perldoc -f fork
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: 20 Aug 2000 22:37:04 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Opening new processes...
Message-Id: <slrn8q0n71.l5b.mgjv@martien.heliotrope.home>
On Sun, 20 Aug 2000 14:36:17 -0400,
Dave <superman183@hotmail.com> wrote:
> Hi,
>
> I have a perl script which I want to kick off several other processes, each
> of which will create a file, which in turn the parent script will process
> when all the files have been created. Each child process takes about six or
> seven seconds to complete, so it's better to kick them off all at once
> rather than wait for each process to complete before kicking off the next
> one....anyway, I don't seem able to get it working the way in which I want:
Is that really true? If all of the processes is I/O-bound or all of them
are CPU bound, you will find that it makes no difference to the running
time, unless you have multiple CPUs. Each process takes 6-7 seconds on
its own. But what about if something else is soaking up resources?
> but each new process is only kicked off when the previous one has finished,
> where what I really want is for them all to be kicked off just about at the
> same time without waiting for the previous one to complete. I'm not
> especially hot on Perl or Unixy things, but I'm sure that it must be
I'll deduce that you are on *nix from this statement:
# perldoc -f fork
and
# perldoc perlipc
If you're not on *nix:
# perldoc perlfork
Martien
--
Martien Verbruggen |
Interactive Media Division | You can't have everything, where
Commercial Dynamics Pty. Ltd. | would you put it?
NSW, Australia |
------------------------------
Date: 21 Aug 2000 00:46:42 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: Out of memory! error. Working with arrays...
Message-Id: <966818801.850399@elaine.furryape.com>
In article <399D2E60.8902A925@hotmail.com>,
Alex T. <samara_biz@hotmail.com> wrote:
>I wrote my first program on ZX Spectrum 48... you know those 8-bit computers
>with ZX8000 3.5Mhz processor, 16 kb of ROM for operating system and 48 kb of
>RAM which used cassette tapes for storage. Took 5 minutes to load a program. :)
Actually the Z80 processor, a clone of the 8080 with a few enhancements.
------------------------------
Date: 20 Aug 2000 21:44:10 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl5.6 new reg-ex errors (but only when you're on crack)
Message-Id: <8npjfa$bt2$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Michael Maraist
<maraist@udel.edu>],
who wrote in article <8np45k$qsc$1@news.udel.edu>:
> I haven't found any documentation on bugs in the new reg-ex engine, so
> I'll post a question here.
>
> First, nested reg-exs core dumps for me.
As expected.
Ilya
------------------------------
Date: Sun, 20 Aug 2000 15:24:55 -0700
From: David <NIXSPAMdrh@engineer.com>
Subject: rookie question: comparing text string to directory contents
Message-Id: <cii0qscuojto39roinjgh7916r6ltbml81@4ax.com>
Hi
I've begun learning perl to better administer my system. I'd appreciate any help on this next
question:
Here is the scenario: I have one directory (directory A) with many files all in the following
format:
1234...xxx_abcd.psd
where 1234...xxx is a string of numbers between 5 and 12 characters in length
followed by an underscore
followed by a random alpha-numeric string (abcd in this case)
followed by a .psd extension.
In a text file, each on a separate line, there is a list of the file names (before the underscore)
in "directory A" in the following format:
1234...xxx
where 1234...xxx is a string of numbers between 5 and 12 characters in length
Most of the numbers in the text file have a corresponding match in directory A (minus the
underscore, the random digits and the .psd extension)
I have been trying to write a script that will compare the text file to the contents of directory A
that will leave all matches alone, copy "orphan" strings in the text file to text file B and move
orphans of directory A into directory B.
From what I understand, this is the kind of stuff that perl lives for, but I'm having trouble making
it happen. I've been reading "Learning Perl" but (for now) this is still a bit out of my league.
Any suggestions are welcome, or if this is a common type of admin task and there are scripts
available on the internet that can be modified as needed I'd be very happy to learn of them.
Thanks in advance,
David.
------------------------------
Date: Sun, 20 Aug 2000 20:05:28 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: rookie question: comparing text string to directory contents
Message-Id: <Pine.GSO.4.21.0008201913060.5763-100000@crusoe.crusoe.net>
[posted & mailed]
On Aug 20, David said:
>Here is the scenario: I have one directory (directory A) with many files all in the following
>format:
>
>1234...xxx_abcd.psd
> where 1234...xxx is a string of numbers between 5 and 12 characters in length
>followed by an underscore
>followed by a random alpha-numeric string (abcd in this case)
>followed by a .psd extension.
Firstly, these files can be matched by the following regular expression
(if this needs to be used at all):
m!
^ # beginning of string
\d{5,12} # 5-12 digits (0-9)
_ # an underscore
[^\W_]+ # 1 or more characters that aren't non-word and aren't _
# this is a shorthand for saying "word characters that
# aren't underscore" and could be written as [a-zA-Z0-9]+
# except that if you need your locale to be in effect, the
# [^\W_]+ version is correct
\. psd # the string '.psd'
$ # end of string
!x
>In a text file, each on a separate line, there is a list of the file names (before the underscore)
>in "directory A" in the following format:
>1234...xxx
>where 1234...xxx is a string of numbers between 5 and 12 characters in length
>I have been trying to write a script that will compare the text file to
>the contents of directory A that will leave all matches alone, copy
>"orphan" strings in the text file to text file B and move orphans of
>directory A into directory B.
Ok, so let's break down the order of operations:
1) get a directory listing of dir A
2) open the text file
3) for each line in the file:
3.1) if a file in dir A starts with the sequence, go to next line
3.2) else, append the sequence to another file
4) if any files in dir A aren't in the text file, move them to dir B
The following is how I would approach this problem:
$text_from = "/path/to/read.txt";
$text_to = "/path/to/append.txt";
$dir_to = "/path/to/directory_to";
$dir_from = "/path/to/directory_from";
%files = ();
%seen = ();
opendir DIR, $dir_to or die "can't open $dir_to: $!";
while (defined($file = readdir DIR)) {
# skip filename if it doesn't match the pattern
/^(\d{5,12})_[^\W_]+\.psd$/ or next;
$seen{$1} = $files{$1} = $_;
}
closedir DIR;
open LISTING, $text_from or die "can't read $text_from: $!";
open ORPHANS, ">>$text_to" or die "can't append to $text_to: $!";
while (<LISTING>) {
chomp; # remove trailing newline
# if the entry is in the directory, it's not an orphan entry or file
if ($files{$_}) { delete $seen{$_} }
# if the entry is not in the directory, it's an orphan entry
else { print ORPHANS "$_\n" }
}
close LISTING;
close ORPHANS;
# the keys of the hash %seen are orphan files that weren't in the file
for (keys %seen) { rename "$dir_from/$_" => "$dir_to/$_" }
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Mon, 21 Aug 2000 00:26:16 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: rookie question: comparing text string to directory contents
Message-Id: <39A07757.E9A6952A@rochester.rr.com>
David wrote:
...
> I've begun learning perl to better administer my system. I'd appreciate any help on this next
> question:
>
> Here is the scenario: I have one directory (directory A) with many files all in the following
> format:
>
> 1234...xxx_abcd.psd
> where 1234...xxx is a string of numbers between 5 and 12 characters in length
> followed by an underscore
> followed by a random alpha-numeric string (abcd in this case)
> followed by a .psd extension.
>
> In a text file, each on a separate line, there is a list of the file names (before the underscore)
> in "directory A" in the following format:
>
> 1234...xxx
> where 1234...xxx is a string of numbers between 5 and 12 characters in length
>
> Most of the numbers in the text file have a corresponding match in directory A (minus the
> underscore, the random digits and the .psd extension)
>
> I have been trying to write a script that will compare the text file to the contents of directory A
> that will leave all matches alone, copy "orphan" strings in the text file to text file B and move
> orphans of directory A into directory B.
>
> From what I understand, this is the kind of stuff that perl lives for, but I'm having trouble making
> it happen. I've been reading "Learning Perl" but (for now) this is still a bit out of my league.
> Any suggestions are welcome, or if this is a common type of admin task and there are scripts
> available on the internet that can be modified as needed I'd be very happy to learn of them.
...
> David.
You didn't say what your platform is, so I did it for a Unix-like
system. Here is a somewhat annotated program that should do what you
want [only partially tested]:
@dir=</path/to/A/*.psd>; #get directory listing of directory A
chomp @dir; #remove trailing newlines if any
for(@dir){ #step through files in directory listing
next unless /^(\d{5,12})_(\w{4})\.psd$/; #skip files with wrong format
$num=$1; #leading number part
$ext=$2; #extension part
#insert optional test for duplicates here
$dir{$num}=$ext; #save number part as key, extension part as value
}
open A,"textfileA" or die "Couldn't open text file A, $!\n";
@a=<A>; #get text file A
close A;
chomp @a; #remove trailing newlines
open B,">textfileB" or die "Couldn't open text file B for write, $!\n";
for(@a){ #step through entries in text file A
#optional test for dups here
$a{$_}=1; #save as keys for later
print B "$_\n" unless exists $dir{$_}; #write to file B if no file
}
close B;
for(keys %dir){ #step through directory listing
next if exists $a{$_}; #match in text file A?
$r=system("mv ${_}_$dir{$_}.psd /path/to/B"); #if not, move to dir B
warn "\nReturn code from mv was $r\n" if $r; #check for success
}
--
Bob Walton
------------------------------
Date: Sun, 20 Aug 2000 15:03:08 -0700
From: musicfan <musicfan@punitiveart.com>
Subject: Script skipping a section!?!?
Message-Id: <27i0qski8jdnq9m86vmi2kmud9e13nlulk@4ax.com>
Any idea why this would happen:
Running this in the debugger it goes just fine but once it hits
foreach $rec(@PEOPLE){
it jumps to close(PEOPLE);
There are records in there, it just jumps past them all.
I'm trying to update field3 (clickthrough) from 0 to 1 with this
script based on username.
#!/usr/local/bin/perl
# run sub to grab form input
&GetFormInput;
$datafile = 'http://localhost/Scripts/people.db';
$username = $field{'username'} ;
# open db, search recs to find matching username
open(PEOPLE, ">>$datafile");
@PEOPLE=<PEOPLE>;
foreach $rec(@PEOPLE){
($name,$password,$clickthrough)=split(/\|/,$rec);
if ($name eq $username){
print DATABASE
"$username|$password|1\n";
}else{
print DATABASE
"$name|$password|0\n";
}
}
close(PEOPLE);
print "$username";
#subs
sub GetFormInput {
(*fval) = @_ if @_ ;
local ($buf);
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN,$buf,$ENV{'CONTENT_LENGTH'});
}
else {
$buf=$ENV{'QUERY_STRING'};
}
if ($buf eq "") {
return 0 ;
}
else {
@fval=split(/&/,$buf);
foreach $i (0 .. $#fval){
($name,$val)=split (/=/,$fval[$i],2);
$val=~tr/+/ /;
$val=~ s/%(..)/pack("c",hex($1))/ge;
$name=~tr/+/ /;
$name=~ s/%(..)/pack("c",hex($1))/ge;
if (!defined($field{$name})) {
$field{$name}=$val;
}
else {
$field{$name} .= ",$val";
#if you want multi-selects to goto
into an array change to:
#$field{$name} .= "\0$val";
}
}
}
return 1;
}
------------------------------
Date: 20 Aug 2000 17:01:05 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Script skipping a section!?!?
Message-Id: <87lmxr4mou.fsf@limey.hpcc.uh.edu>
>> On Sun, 20 Aug 2000 15:03:08 -0700,
>> musicfan <musicfan@punitiveart.com> said:
> Any idea why this would happen: Running this in the
> debugger it goes just fine but once it hits
Judging from your code below, I have a hard time believing
this statement. You're probably seeing something else and
conflating the issues.
> #!/usr/local/bin/perl
#!.../perl -w
use strict;
will help you enormously.
> &GetFormInput;
use CGI ':standard';
"perldoc CGI" for more info. The standard and simplest
way of handling CGI data in perl. Your hand-built parsing
code has some well-known security problems.
Also CGI.pm has lots of nice HTML and HTTP methods for
producing output without HTML/perl quoting clashes.
> # open db, search recs to find matching username
> open(PEOPLE, ">>$datafile");
Take a look at how you are opening the file. You are
appending, then trying to read. That won't do what you
want.
Also you do not check that the open succeeded:
open PEOPLE, ... or die "HELPFUL MESSAGE GOES HERE: $!\n";
With the CGI::Carp module, die messages will appear in the
browser, which will help with debugging.
> @PEOPLE=<PEOPLE>;
Why not close the file here and now? You've finished
reading from it.
(Stylistic note: your code indentation is bizarre)
hth
t
--
"I'm not easily impressed. Wow! A blue car!"
Homer Simpson
------------------------------
Date: Sun, 20 Aug 2000 22:58:57 +0200
From: Denis Bucher <dbucher@horus.ch>
Subject: Serial port ???
Message-Id: <39A04691.F62A5922@horus.ch>
Hello !
How to read the serial port under Windows f.e. COM1 ???
Denis
--
Denis Bucher, / info@horus.ch Tél. +41-22-8000625 \ Internet
Horus Networks / horus-networks.com Fax: +41-22-8000622 \ Services
/ USA: (206) 888-2335 US Fax: (508) 437-1261 \ Provider
------------------------------
Date: Sun, 20 Aug 2000 18:56:16 GMT
From: "John P. Linderman" <jpl@research.att.com>
Subject: Re: Sorting is very slow
Message-Id: <39A029D0.93E86D41@research.att.com>
Abigail wrote:
> ^^ Yes, it seems to be hard to get that worst case behavior out of
> ^^ quicksort derivates. It seems you can only shift it to less
> ^^ obvious situations.
If only that were true. There are innumerable ways to
write bad qsorts, and people (myself among them) have
found many of them. The last time I ran Sun's system
qsort (more than 5 years ago), it went quad on input
made up of randomly chosen 0's and 1's (thanks to
Jon Bentley for putting me onto that one). Failure to
properly handle many duplicates (as in the qsort code
posted by Sean Malloy) is a common cause of quadratic
behavior. Organ-pipe input is another pitfall,
as Abigail documented.
> ^^ That's what I like about merge sort. It has n log(n) average run
> ^^ time with a small standard deviation.
>
> Well, mergesort not only has O (n log n) average [1] running time, it's
> also the worst case running.
>
> ^^ Why isn't it more often
> ^^ implemented?
>
> Memory. Mergesort doesn't work in-situ, and you an additional Theta (n)
> memory.
If memory were a big deal, Perl would be a dead language.
We're talking N extra pointers, not double the space of the
items pointed to. In exchange for the memory, you get the
gurantee of not going quad, a stabile sorting method (order
of ties is preserved), and, on average, fewer comparisons,
a VERY big deal if you are using a non-trivial compare
(at which point you'd do well to use the GRT, which Larry
or Uri can provide references to.)
Peter McIlroy has written a particularly nice mergesort
implementation. It takes advantage of pre-existing order
in the input, so it looks essentially order N on sorted,
reversed, or organpipe data, but it expends very few
extra comparisons detecting it, so it remains solidly
order NlogN on random input. I rewrote most of
his implementation for Perl, but I'm too much of a
newbie to allocate those extra N pointers. If any guru
would like to lend a hand, I'll be happy to share the
source, and we can see how it compares with the
current qsort-based implementation.
John P. Linderman jpl@research.att.com
------------------------------
Date: 21 Aug 2000 00:41:51 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Sorting is very slow
Message-Id: <slrn8q0ul7.tj3.abigail@alexandra.foad.org>
John P. Linderman (jpl@research.att.com) wrote on MMDXLVI September
MCMXCIII in <URL:news:39A029D0.93E86D41@research.att.com>:
\\ Abigail wrote:
\\
\\ > ^^ Yes, it seems to be hard to get that worst case behavior out of
\\ > ^^ quicksort derivates. It seems you can only shift it to less
\\ > ^^ obvious situations.
\\
\\ If only that were true. There are innumerable ways to
\\ write bad qsorts, and people (myself among them) have
\\ found many of them. The last time I ran Sun's system
\\ qsort (more than 5 years ago), it went quad on input
\\ made up of randomly chosen 0's and 1's (thanks to
\\ Jon Bentley for putting me onto that one). Failure to
\\ properly handle many duplicates (as in the qsort code
\\ posted by Sean Malloy) is a common cause of quadratic
\\ behavior. Organ-pipe input is another pitfall,
\\ as Abigail documented.
\\
\\ > ^^ That's what I like about merge sort. It has n log(n) average run
\\ > ^^ time with a small standard deviation.
\\ >
\\ > Well, mergesort not only has O (n log n) average [1] running time, it's
\\ > also the worst case running.
\\ >
\\ > ^^ Why isn't it more often
\\ > ^^ implemented?
\\ >
\\ > Memory. Mergesort doesn't work in-situ, and you an additional Theta (n)
\\ > memory.
\\
\\ If memory were a big deal, Perl would be a dead language.
Well, yes, but the question wasn't Perl specific. Once you use Perl,
you don't care about memory anymore. But, "cheap memory" is much more
recent than computing, and there are still areas were it's important to
be conservative when it comes to memory.
\\ We're talking N extra pointers, not double the space of the
\\ items pointed to. In exchange for the memory, you get the
\\ gurantee of not going quad, a stabile sorting method (order
\\ of ties is preserved), and, on average, fewer comparisons,
\\ a VERY big deal if you are using a non-trivial compare
\\ (at which point you'd do well to use the GRT, which Larry
\\ or Uri can provide references to.)
\\
\\ Peter McIlroy has written a particularly nice mergesort
\\ implementation. It takes advantage of pre-existing order
\\ in the input, so it looks essentially order N on sorted,
\\ reversed, or organpipe data, but it expends very few
\\ extra comparisons detecting it, so it remains solidly
\\ order NlogN on random input. I rewrote most of
\\ his implementation for Perl, but I'm too much of a
\\ newbie to allocate those extra N pointers. If any guru
\\ would like to lend a hand, I'll be happy to share the
\\ source, and we can see how it compares with the
\\ current qsort-based implementation.
Unfortunally, since Perl is much slower than C, even an O (N log N)
sorting method in Perl is unlikely to beat qsort in C, even if that
goes quadratic. By the time the N log N beats the N^2, you enter the
area where you start swapping, which then becomes the dominant factor.
And by the time the swapping time gets dominated by the N log N, you
run out of memory anyway.... ;-)
Now, a merge- (or heap- (!)) sort for perl (as opposed to Perl) would
be cool. But I doubt it would ever go in.
Abigail
--
:;$:=~s:
-:;another Perl Hacker
:;chop
$:;$:=~y:;::d;print+Just.$:
------------------------------
Date: Sun, 20 Aug 2000 20:41:46 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: subject with smtp.pm
Message-Id: <cf90qs82djvnoid2atlf24hqbdd24ipgtn@4ax.com>
On Sat, 19 Aug 2000 16:27:06 GMT, "Daniel van den Oord"
<danielxx@bart.nl> wrote:
> I'm using NT server and perl 5.6.
> I have written a script sending an email using smtp.pm the script it self is
> below
> I'm wondering how to send an subject/header with it ?!? hope anybody can
> help ?!?
Have a look at the MIME::Lite package.
--
Good luck,
Abe
------------------------------
Date: Sun, 20 Aug 2000 22:23:33 GMT
From: "Daniel van den Oord" <danielxx@bart.nl>
Subject: Re: subject with smtp.pm
Message-Id: <FTYn5.25198$Gd1.149258@Typhoon.bART.nl>
Thanks a lot.. this looks great I'm going to implement this tomorrow in my
script...
I think real Modules are far better then any other 'cheaper modules spreaded
on the net...
So I'l replace the smtp.pm with MIME::Lite...
Thanks again Daniel
------------------------------
Date: 20 Aug 2000 17:41:22 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: subject with smtp.pm
Message-Id: <87itsv4ktp.fsf@limey.hpcc.uh.edu>
>> On Sun, 20 Aug 2000 22:23:33 GMT,
>> "Daniel van den Oord" <danielxx@bart.nl> said:
> Thanks a lot.. this looks great I'm going to implement
> this tomorrow in my script... I think real Modules are
> far better then any other 'cheaper modules spreaded on
> the net... So I'l replace the smtp.pm with
> MIME::Lite...
I'm not sure if anyone else pointed this out explicitly,
but the subject is not part of the SMTP transaction, it
belongs in the body of the mail (what datasend()
constructs). The to() etc. methods of Net::SMTP build the
envelope.
In http://www.faqs.org/rfcs/rfc821.html (as referred to in
"perldoc Net::SMTP")
Please note that the mail data includes the memo header
items such as Date, Subject, To, Cc, From [2].
Hence MIME::Lite would in this case be a better choice as
it builds the content of mail messages, where the subject
belongs.
I'm not sure what you mean by Net::SMTP being "cheaper"
than MIME::Lite, it's just a matter of using the right
module for the task at hand.
hth
t
--
"I'm not easily impressed. Wow! A blue car!"
Homer Simpson
------------------------------
Date: 20 Aug 2000 21:27:03 GMT
From: homer.simpson@springfield.nul (Homer Simpson)
Subject: Re: Web Solution Needed - Please respond
Message-Id: <8npif7$2j7$0@216.39.131.173>
Now this is what I remember news groups being like years ago...
Humor, gentle chiding for inappropriate posting, and useful information
besides.
Eric, coming on the heels of last weeks posts about the tone of this news
group it seems esp. timely.
[complete post and comment quoted by way of example]
ebohlman@netcom.com (Eric Bohlman) responded to this:
>: I host a web site for a local auto dealer who wants to place his
>: pre-owned inventory on the web.
>
>Bad idea. It's been my experience that when you chop a used car into
>pieces small enough to transmit by TCP/IP, it doesn't run very well
>afterwards.
>
>: What I need is an "engine" of sorts that can read data from a text based
>: database file. Please send me your input, proposals, etc. I can provide
>: more elaboration once we make initial contact.
with this pity reply:
>This group isn't an appropriate place for posting RFPs, and I'm not
>convinced that any Usenet groups are really appropriate for such (the
>*.jobs groups are really for offers of salary+benefits+cubicle positions,
>not one-off projects). If I were you, I'd visit <URL:http://www.pm.org>
>and find a Perl Mongers group near you, and get in touch with them.
>They're likely to have one or more members who do this sort of thing.
>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4074
**************************************