[12637] in Perl-Users-Digest
Perl-Users Digest, Issue: 46 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 07:18:42 1999
Date: Wed, 7 Jul 1999 04:07:23 -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 Wed, 7 Jul 1999 Volume: 9 Number: 46
Today's topics:
rudimentary database routines. <kehrman@mindspring.com>
Re: rudimentary database routines. <gellyfish@gellyfish.com>
Scalars ---> Arrays nerilius@my-deja.com
Re: Scalars ---> Arrays <swiftkid@bigfoot.com>
Re: Scalars ---> Arrays <gellyfish@gellyfish.com>
Re: Scalars ---> Arrays <swiftkid@bigfoot.com>
Re: Scalars ---> Arrays <uri@sysarch.com>
Re: Scalars ---> Arrays <gellyfish@gellyfish.com>
Re: Scalars ---> Arrays (Bart Lateur)
Re: Scalars ---> Arrays <swiftkid@bigfoot.com>
Re: Scalars ---> Arrays (Abigail)
Re: Scalars ---> Arrays (Bart Lateur)
Re: Scalars ---> Arrays <swiftkid@bigfoot.com>
Re: Scalars ---> Arrays <gellyfish@gellyfish.com>
Re: Scalars ---> Arrays <swiftkid@bigfoot.com>
Re: Search Engine Problem -- newbie question <jason@killdare.demon.co.uk>
Re: Search Engine Problem -- newbie question (Abigail)
Segmentation Fault <martin@guest-books.com>
Re: Segmentation Fault (Anno Siegel)
Re: Segmentation Fault (Alastair)
Re: Segmentation Fault (Ilya Zakharevich)
Sending email by perl in NT bababozorg@aol.com
Re: Sending email by perl in NT <nmorison@ozemail.com.au>
Re: Sending email by perl in NT <x9730915@uea.ac.uk>
Re: Sending email by perl in NT <aperrin@mcmahon.qal.berkeley.edu>
Re: Sending email by perl in NT <swiftkid@bigfoot.com>
Re: Sending email by perl in NT <jtolley@bellatlantic.net>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 04 Jul 1999 08:34:14 -0400
From: "Kenneth D. Ehrman" <kehrman@mindspring.com>
Subject: rudimentary database routines.
Message-Id: <7lnkg5$282$1@nntp9.atl.mindspring.net>
Hello,
I am looking for a collection of routines to provide basic database
functionality. I am developing a large project as learning experience and do
not really have the time to re-invent this wheel. When I go live with the
site, I will re-code for SQL. In the meantime, I do not have access to and
SQL server.
I know it's probably some where very easy to find, and that some of you will
lambast me for asking this simple question, but I'm hoping to use this group
to shorten my learning curve.
Any help will be most appreciated.
Sincerly
Ken
------------------------------
Date: 4 Jul 1999 13:53:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: rudimentary database routines.
Message-Id: <7lnp0l$3t8$1@gellyfish.btinternet.com>
On Sun, 04 Jul 1999 08:34:14 -0400 Kenneth D. Ehrman wrote:
> Hello,
> I am looking for a collection of routines to provide basic database
> functionality. I am developing a large project as learning experience and do
> not really have the time to re-invent this wheel. When I go live with the
> site, I will re-code for SQL. In the meantime, I do not have access to and
> SQL server.
>
You might consider using DBD::CSV (available from CPAN) as this will enable
you to switch to a real database by basically changing the connect string.
The module has some dependencies - from the README file :
Prerequisites
The only system dependent feature that DBD::File uses, is the flock()
function. Thus the module should run (in theory) on any system with a
working flock(), in particular on all Unix machines, on Windows 95 and
NT.
Unlike other DBI drivers, you don't need an external SQL engine or a
running server. All you need are the following Perl modules, available
from any CPAN mirror, for example
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module
DBI the DBI (Database independent interface for Perl), version 1.00 or a
later release
SQL::Statement
a simple SQL engine
Text::CSV_XS
this module is used for writing rows to or reading rows from CSV
files.
Of course the performance is not what you would get from a 'real'
database engine ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 03 Jul 1999 14:18:01 GMT
From: nerilius@my-deja.com
Subject: Scalars ---> Arrays
Message-Id: <7ll62l$7ai$1@nnrp1.deja.com>
I need to write a program that can take a scalar and convert it into an
array in which each letter or number of the scalar is turned into an
array ellement.
e.g.
$scalar = "newsgroups"; #somehow turns into
@scalar = qw(n e w s g r o u p s); #an array
$scalar[1] = e
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sat, 3 Jul 1999 19:54:27 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lmbgo$ai53@news.cyber.net.pk>
> $scalar = "newsgroups"; #somehow turns into
> @scalar = qw(n e w s g r o u p s); #an array
> $scalar[1] = e
$scalar = 'newsgroups';
@scalar = split // , $scalar;
# $scalar [ 1 ] is 'e'
------------------------------
Date: 4 Jul 1999 15:41:52 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lnvc0$418$1@gellyfish.btinternet.com>
On Sat, 3 Jul 1999 19:54:27 +0500 Faisal Nasim wrote:
>> $scalar = "newsgroups"; #somehow turns into
>> @scalar = qw(n e w s g r o u p s); #an array
>> $scalar[1] = e
>
> $scalar = 'newsgroups';
> @scalar = split // , $scalar;
>
> # $scalar [ 1 ] is 'e'
>
Oh thats so predictable and way too efficient for my liking - I'd
go with :
#!/usr/bin/perl -w
use strict;
my $string = 'newsgroups';
my @array;
my $length = length($string) ;
unshift @array,substr($string,$length,1) while ($length--);
print "@array";
I mean why go to all the expense of some meganutterbastard 'pootey if
you're not going to use some of those spare cycles ;-}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 5 Jul 1999 11:39:02 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lqn8a$asd5@news.cyber.net.pk>
> Oh thats so predictable and way too efficient for my liking - I'd
> go with :
I really don't understand what you mean.
> #!/usr/bin/perl -w
>
> use strict;
> my $string = 'newsgroups';
> my @array;
> my $length = length($string) ;
> unshift @array,substr($string,$length,1) while ($length--);
> print "@array";
Is it good to quote an array when there is no need?
You could also:
use strict;
my $str = 'newsgroups';
my @array;
unshift @array , chop $str while $str;
> I mean why go to all the expense of some meganutterbastard 'pootey if
> you're not going to use some of those spare cycles ;-}
Again, I don't understand what you are trying to say.
------------------------------
Date: 05 Jul 1999 03:55:23 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <x7so73y1hw.fsf@home.sysarch.com>
>>>>> "FN" == Faisal Nasim <swiftkid@bigfoot.com> writes:
>> Oh thats so predictable and way too efficient for my liking - I'd
>> go with :
FN> I really don't understand what you mean.
>> #!/usr/bin/perl -w
>>
>> use strict;
>> my $string = 'newsgroups';
>> my @array;
>> my $length = length($string) ;
>> unshift @array,substr($string,$length,1) while ($length--);
>> print "@array";
FN> Is it good to quote an array when there is no need?
FN> You could also:
FN> use strict;
FN> my $str = 'newsgroups';
FN> my @array;
FN> unshift @array , chop $str while $str;
>> I mean why go to all the expense of some meganutterbastard 'pootey if
>> you're not going to use some of those spare cycles ;-}
FN> Again, I don't understand what you are trying to say.
abigail is messing with your head.
and please leave attributions of who you are quoting. i am pretty sure
ii is abby but it helps if you show who it was. but since you are using
redmondware, i have no idea if that cade properly attribute quotes.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 5 Jul 1999 09:19:19 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <37806a87@newsread3.dircon.co.uk>
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "FN" == Faisal Nasim <swiftkid@bigfoot.com> writes:
>
> >> Oh thats so predictable and way too efficient for my liking - I'd
> >> go with :
>
> FN> I really don't understand what you mean.
>
>
> abigail is messing with your head.
>
> and please leave attributions of who you are quoting. i am pretty sure
> ii is abby but it helps if you show who it was. but since you are using
> redmondware, i have no idea if that cade properly attribute quotes.
>
No, it was I. But you got the motivation right anyhow ;-}
/J\
--
"I'm not Carol Vorderman - you wouldn't see me getting drunk in a kebab
shop" - Lily Savage
------------------------------
Date: Mon, 05 Jul 1999 08:35:34 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Scalars ---> Arrays
Message-Id: <37806b3a.2031236@news.skynet.be>
Faisal Nasim wrote:
>> print "@array";
>
>Is it good to quote an array when there is no need?
What do you mean, "no need"? { "@array" } stringifies the array, by
intermixing the value of $" between the elements. { print @array } does
pretty much the same, but with $, . Except that the default value for $"
is a space, and for $, it's a null string.
>You could also:
>
>use strict;
>my $str = 'newsgroups';
>my @array;
>unshift @array , chop $str while $str;
Nope. Buggy. Try:
my $str = '012345';
my @array;
unshift @array , chop $str while $str;
local $, = " "; print @array;
-->
1 2 3 4 5
Hint: "0" is false, even as a string.
>> I mean why go to all the expense of some meganutterbastard 'pootey if
>> you're not going to use some of those spare cycles ;-}
>
>Again, I don't understand what you are trying to say.
I think he's referring to the current humorous habit of answerring FAQ's
with working, but far to elaborate (and slow) solutions. I'd call it
something like "FAQ obfuscation".
Oh, here's my contribution:
$str = 'newsgroups';
@array = map chr, unpack "C*",$str;
# print "@array\n";
Bart.
------------------------------
Date: Mon, 5 Jul 1999 14:29:29 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lr171$coh5@news.cyber.net.pk>
> What do you mean, "no need"? { "@array" } stringifies the array, by
> intermixing the value of $" between the elements. { print @array } does
> pretty much the same, but with $, . Except that the default value for $"
> is a space, and for $, it's a null string.
I didn't know that!
>
> >You could also:
> >
> >use strict;
> >my $str = 'newsgroups';
> >my @array;
> >unshift @array , chop $str while $str;
>
> Nope. Buggy. Try:
>
> my $str = '012345';
> my @array;
> unshift @array , chop $str while $str;
> local $, = " "; print @array;
> -->
> 1 2 3 4 5
Whats the difference? (you are just printing the array too!)
> Hint: "0" is false, even as a string.
What is the hint for?
> Oh, here's my contribution:
>
> $str = 'newsgroups';
> @array = map chr, unpack "C*",$str;
> # print "@array\n";
looks good, but is it more efficient than split?
------------------------------
Date: 5 Jul 1999 05:09:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Scalars ---> Arrays
Message-Id: <slrn7o111o.h6v.abigail@alexandra.delanet.com>
Uri Guttman (uri@sysarch.com) wrote on MMCXXXIV September MCMXCIII in
<URL:news:x7so73y1hw.fsf@home.sysarch.com>:
&& >>>>> "FN" == Faisal Nasim <swiftkid@bigfoot.com> writes:
&&
&& >> Oh thats so predictable and way too efficient for my liking - I'd
&& >> go with :
&&
&& FN> I really don't understand what you mean.
&&
&& >> #!/usr/bin/perl -w
&& >>
&& >> use strict;
&& >> my $string = 'newsgroups';
&& >> my @array;
&& >> my $length = length($string) ;
&& >> unshift @array,substr($string,$length,1) while ($length--);
&& >> print "@array";
&&
&& FN> Is it good to quote an array when there is no need?
&&
&& FN> You could also:
&&
&& FN> use strict;
&& FN> my $str = 'newsgroups';
&& FN> my @array;
&& FN> unshift @array , chop $str while $str;
&&
&&
&& >> I mean why go to all the expense of some meganutterbastard 'pootey if
&& >> you're not going to use some of those spare cycles ;-}
&&
&& FN> Again, I don't understand what you are trying to say.
&&
&& abigail is messing with your head.
I doubt it.
&& and please leave attributions of who you are quoting. i am pretty sure
&& ii is abby but it helps if you show who it was. but since you are using
&& redmondware, i have no idea if that cade properly attribute quotes.
I don't think I wrote that. First, nothing in the references header
suggest I was involved in this thread. Second, that code is not my
style. It doens't have spaces where it should, and it has parens where
it shouldn't.
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 05 Jul 1999 11:49:52 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Scalars ---> Arrays
Message-Id: <37839b61.2720160@news.skynet.be>
Faisal Nasim wrote:
>> 1 2 3 4 5
>
>Whats the difference? (you are just printing the array too!)
The difference is that the zero is missing! There *was* a zero at the
start of the string, wasn't there?
Bart.
------------------------------
Date: Mon, 5 Jul 1999 22:11:45 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lrs9q$coh6@news.cyber.net.pk>
> >> 1 2 3 4 5
> >
> >Whats the difference? (you are just printing the array too!)
>
> The difference is that the zero is missing! There *was* a zero at the
> start of the string, wasn't there?
Ooopss... yeah.
How about:
unshift @array , chop $str while length $str;
------------------------------
Date: 5 Jul 1999 20:19:26 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lr40f$5bt$1@gellyfish.btinternet.com>
On Mon, 5 Jul 1999 22:11:45 +0500 Faisal Nasim wrote:
>> >> 1 2 3 4 5
>> >
>> >Whats the difference? (you are just printing the array too!)
>>
>> The difference is that the zero is missing! There *was* a zero at the
>> start of the string, wasn't there?
>
> Ooopss... yeah.
>
> How about:
>
> unshift @array , chop $str while length $str;
>
Ok lets see (I throw in the bonus regex solution for comparison):
Benchmark: timing 100000 iterations of Bart, Faisal, Jonathan, Regex, Traditional...
Bart: 15 wallclock secs (15.17 usr + 0.00 sys = 15.17 CPU)
Faisal: 16 wallclock secs (14.74 usr + 0.00 sys = 14.74 CPU)
Jonathan: 18 wallclock secs (16.62 usr + 0.00 sys = 16.62 CPU)
Regex: 13 wallclock secs (12.42 usr + 0.00 sys = 12.42 CPU)
Traditional: 13 wallclock secs (13.17 usr + 0.00 sys = 13.17 CPU)
I Win !!! ;-}
#!/usr/bin/perl -w
use Benchmark;
use strict;
sub traditional
{
my $string = 'newsgroups';
my @array = split // , $string;
}
sub jonathan
{
my @array;
my $string = 'newsgroups';
my $length = length($string) ;
unshift @array,substr($string,$length,1) while ($length--);
}
sub bart
{
my $string = 'newsgroups';
my @array = map chr, unpack "C*",$string;
}
sub faisal
{
my $string = 'newsgroups';
my @array;
unshift @array , chop $string while length $string;
}
sub regex
{
my $string = 'newsgroups';
my @array = $string =~ /(.)/g;
}
timethese(100000,{
Traditional => \&traditional,
Bart => \&bart,
Faisal => \&faisal,
Jonathan => \&jonathan,
Regex => \®ex
});
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Tue, 6 Jul 1999 19:37:52 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Scalars ---> Arrays
Message-Id: <7lu7qm$dfl8@news.cyber.net.pk>
> Ok lets see (I throw in the bonus regex solution for comparison):
>
> Benchmark: timing 100000 iterations of Bart, Faisal, Jonathan, Regex,
Traditional...
> Bart: 15 wallclock secs (15.17 usr + 0.00 sys = 15.17 CPU)
> Faisal: 16 wallclock secs (14.74 usr + 0.00 sys = 14.74 CPU)
> Jonathan: 18 wallclock secs (16.62 usr + 0.00 sys = 16.62 CPU)
> Regex: 13 wallclock secs (12.42 usr + 0.00 sys = 12.42 CPU)
> Traditional: 13 wallclock secs (13.17 usr + 0.00 sys = 13.17 CPU)
>
> I Win !!! ;-}
I posted that initial 'traditional' so I came second, thats not bad for a
kid though :)
If you look at non-traditional (regex and traditional) you are @ last!
BTW, If it took 14.74, 0 sys and 14.74 sec how can it be 16 wallclock secs?
Your answer: the same way its 18 for 16.62, 0 and 16.62 :)
My reply: Can ya tell me logic?
------------------------------
Date: Sun, 4 Jul 1999 00:44:20 +0100
From: Jason <jason@killdare.demon.co.uk>
Subject: Re: Search Engine Problem -- newbie question
Message-Id: <7TAV3LAUBqf3Ewaa@killdare.demon.co.uk>
In article <slrn7nluud.31h.abigail@alexandra.delanet.com>, Abigail
<abigail@delanet.com> writes
>That would have costed him another 100 dollars. And I sensed an empty wallet.
>
>Abigail
So, by day you write perl programs but what the hell are you doing by
night?! What would $100 buy me, I'm intrigued?
--
Jason@killdare.demon.co.uk
------------------------------
Date: 4 Jul 1999 00:12:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Search Engine Problem -- newbie question
Message-Id: <slrn7ntr9s.31h.abigail@alexandra.delanet.com>
Jason (jason@killdare.demon.co.uk) wrote on MMCXXXII September MCMXCIII
in <URL:news:7TAV3LAUBqf3Ewaa@killdare.demon.co.uk>:
%% In article <slrn7nluud.31h.abigail@alexandra.delanet.com>, Abigail
%% <abigail@delanet.com> writes
%% >That would have costed him another 100 dollars. And I sensed an empty wallet.
%% >
%% >Abigail
%%
%% So, by day you write perl programs but what the hell are you doing by
I don't.
%% night?! What would $100 buy me, I'm intrigued?
Enlightment.
Abigail
--
sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
$y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 5 Jul 1999 00:15:28 +0100
From: "Martin" <martin@guest-books.com>
Subject: Segmentation Fault
Message-Id: <7lopqt$724$1@gxsn.com>
Hi!
I'm running Perl5.005_02 in a Windows system which will execute a script
I've written correctly. However, on a unix system using Perl5.004_04 the
script gives a 'Segmentation Fault'.
I don't have the power to update the version of Perl on the Unix system
so was wondering if anyone would please tell me what a Segmentation
Fault is.
Martin
------------------------------
Date: 6 Jul 1999 00:18:36 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Segmentation Fault
Message-Id: <7lri0s$1ff$1@lublin.zrz.tu-berlin.de>
Martin <martin@guest-books.com> wrote in comp.lang.perl.misc:
>Hi!
>
>I'm running Perl5.005_02 in a Windows system which will execute a script
>I've written correctly. However, on a unix system using Perl5.004_04 the
>script gives a 'Segmentation Fault'.
>
>I don't have the power to update the version of Perl on the Unix system
>so was wondering if anyone would please tell me what a Segmentation
>Fault is.
It means your program tried to access a memory location it has no
business accessing.
I doubt this will spare you the effort of upgrading.
Anno
------------------------------
Date: Tue, 06 Jul 1999 00:23:36 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Segmentation Fault
Message-Id: <slrn7o2mpd.5p.alastair@calliope.demon.co.uk>
Martin <martin@guest-books.com> wrote:
>Hi!
>
>I'm running Perl5.005_02 in a Windows system which will execute a script
>I've written correctly. However, on a unix system using Perl5.004_04 the
>script gives a 'Segmentation Fault'.
A 'segmentation fault' usually means a memory access violation. I've never seen
one on 'unix' (that's Linux and IRIX for me). I'm quite surprised but I'm sure
others have seen this occur ;-)
I guess I'd have to start looking at running trying parts of the program and
seeing if you can narrow the problem down. Assuming you're not using Perl 5.005
specific features - or threads perhaps.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: 6 Jul 1999 07:08:23 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Segmentation Fault
Message-Id: <7lsa17$98i$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Alastair
<alastair@calliope.demon.co.uk>],
who wrote in article <slrn7o2mpd.5p.alastair@calliope.demon.co.uk>:
> A 'segmentation fault' usually means a memory access violation. I've never seen
> one on 'unix' (that's Linux and IRIX for me). I'm quite surprised but I'm sure
> others have seen this occur ;-)
perl -wle 'print unpack "p", pack "I", 32'
Ilya
------------------------------
Date: Tue, 06 Jul 1999 13:04:35 GMT
From: bababozorg@aol.com
Subject: Sending email by perl in NT
Message-Id: <7lsusu$det$1@nnrp1.deja.com>
hi
i know how to send email by perl in unix, i simply would using these:
$mailprog= '/usr/lib/sendmail';
open(MAIL,"|$mailprog -t");
print MAIL "To: reciver\n";
print MAIL "From: sender\n";
print MAIL "Subject: subject\n\n";
print MAIL "text";
close (MAIL);
but i just want to know can i use the same thing in NT?
i dont have NT to check it so i can test it! :)
if i cant what do i have to change?
thanks for your help
hamed
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 6 Jul 1999 23:47:24 +1000
From: "Neale Morison" <nmorison@ozemail.com.au>
Subject: Re: Sending email by perl in NT
Message-Id: <%Ong3.3154$A55.23096@ozemail.com.au>
bababozorg@aol.com wrote in message <7lsusu$det$1@nnrp1.deja.com>...
>hi
>i know how to send email by perl in unix,
>but i just want to know can i use the same thing in NT?
use Net::SMTP; # install libnet package
------------------------------
Date: Tue, 6 Jul 1999 14:49:59 +0100
From: Paul Russell <x9730915@uea.ac.uk>
Subject: Re: Sending email by perl in NT
Message-Id: <Pine.OSF.3.95q.990706144120.8986B-100000@cpca4.uea.ac.uk>
Hi,
> but i just want to know can i use the same thing in NT?
As far as I know, you can't use the same thing in NT because I don't think
there's a sendmail binary.
What you could do is use the Net::SMTP module and pump the e-mail directly
to an SMTP server if the site has one. Failing that, you're going to need
to talk to MAPI and as far as I know, there's not an interface to that
yet. Sadly, it could be a non-flyer.
Sorry I can't be more help...
Paul
------------------------------
Date: Tue, 06 Jul 1999 08:01:16 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Sending email by perl in NT
Message-Id: <37821A3B.E4019F0C@mcmahon.qal.berkeley.edu>
Although fundamentally Net::FTP is clearly The Right Answer, if for some
reason you feel uncomfortable with it, there's a useful little wedge called
NMail95, which will send email from a command line and therefore is very
useful for e-mailing from braindead^H^H^H^H^H^H^H^H^H windows machines:
http://www.geocities.com/SiliconValley/Lakes/2382/netmail.html
Paul Russell wrote:
> Hi,
>
> > but i just want to know can i use the same thing in NT?
>
> As far as I know, you can't use the same thing in NT because I don't think
> there's a sendmail binary.
--
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting - aperrin@mcmahon.qal.berkeley.edu
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: Tue, 6 Jul 1999 19:28:57 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Sending email by perl in NT
Message-Id: <7lu75h$dfl7@news.cyber.net.pk>
> As far as I know, you can't use the same thing in NT because I don't think
> there's a sendmail binary.
You CAN use the very same thing for NT too! You just need a sendmail for
Windows.... www.demobuilder.com, but its not free :-(
--
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift ICQ: 4265451
FAX: (815) 846-2877
------------------------------
Date: Tue, 06 Jul 1999 16:28:15 GMT
From: "James Tolley" <jtolley@bellatlantic.net>
Subject: Re: Sending email by perl in NT
Message-Id: <z8qg3.406$dV1.64115@typhoon1.gnilink.net>
You could check the latest issue of The Perl Journal for a few good ideas
and examples: Mail::Mailer, Net::SMTP, and one custom solution which is free
for download from their ftp site.
<bababozorg@aol.com> wrote in message news:7lsusu$det$1@nnrp1.deja.com...
> hi
> i know how to send email by perl in unix, i simply would using these:
> $mailprog= '/usr/lib/sendmail';
> open(MAIL,"|$mailprog -t");
> print MAIL "To: reciver\n";
> print MAIL "From: sender\n";
> print MAIL "Subject: subject\n\n";
> print MAIL "text";
> close (MAIL);
> but i just want to know can i use the same thing in NT?
> i dont have NT to check it so i can test it! :)
> if i cant what do i have to change?
> thanks for your help
> hamed
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 46
************************************