[15744] in Perl-Users-Digest
Perl-Users Digest, Issue: 3157 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 25 06:05:30 2000
Date: Thu, 25 May 2000 03:05:17 -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: <959249116-v9-i3157@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 25 May 2000 Volume: 9 Number: 3157
Today's topics:
Re: [LWP] Requesting from the clients' IP, not the serv <gellyfish@gellyfish.com>
Re: alias mail and script perl ghorghor@my-deja.com
Re: array within array revisited <rhomberg@ife.ee.ethz.ch>
Re: Can't Knit Two Files Together <e.roselli@volusoft.com>
Re: Can't Knit Two Files Together <godzilla@stomp.stomp.tokyo>
Re: Can't Knit Two Files Together (Bart Lateur)
Re: Can't Knit Two Files Together (Bart Lateur)
can't run the perl CGI script. <ltlau@yahoo.com>
Compile Perl <dlocci@tiscali.it>
Re: Compile Perl <liberalacasa@libero.it>
Re: email poser <elaine@chaos.wustl.edu>
Re: email poser <elaine@chaos.wustl.edu>
Re: Finding IP addresses+ (Dave Vandervies)
FORM: how to get many results..? happyhippi@my-deja.com
Re: FORM: how to get many results..? <jeff@vpservices.com>
Re: Help needed with SNPP!!!!!!!!!!!!!! <gellyfish@gellyfish.com>
Re: How do you receive mail with sendmail? <elaine@chaos.wustl.edu>
Re: How to read a float type data? (Bart Lateur)
Insert textarea data into mysql text field benxx@my-deja.com
Re: Insert textarea data into mysql text field <jeff@vpservices.com>
Re: Insert textarea data into mysql text field <bill.kemp@wire2.com>
Mysql Perl DBI/DBD <pvsubramanian@email.msn.com>
Re: Mysql Perl DBI/DBD <jeff@vpservices.com>
Re: newbie question - dbi:mysql <rhardicr@ford.com>
Re: Newbie-- Sendmail <agi@feib.com.tw>
Re: Newbie-- Sendmail <gellyfish@gellyfish.com>
Re: opinion on libwww <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 25 May 2000 07:08:31 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: [LWP] Requesting from the clients' IP, not the server's
Message-Id: <8gig0v$qsc$1@orpheus.gellyfish.com>
On Wed, 24 May 2000 18:08:51 +0200 Charles Henry wrote:
> There is a script "geturl.pl" that is located on my server. It just does an
> HTTP request. But the problem is that whenever it is accessed, remotely or
> not, it ALWAYS uses the SERVER's IP, not the CLIENT's. I am not trying to
> spoof, I just want the script to use the client's IP when making requests,
> like it is possible with a ' print "Location: http://www.url.com\n\n" ' (but
> the latter structure doesn't allow as much liberty as with LWP) . I hope
> this is possible ... any help would be greatly, greatly, appreciated (wasted
> too many hours trying to solve this problem).
>
You cannot do this. The IP has to be the one of the host that makes the
connection.
/J\
--
Aw, Dad, you've done a lot of great things, but you're a very old man,
and old people are useless.
--
fortune oscar homer
------------------------------
Date: Thu, 25 May 2000 07:59:20 GMT
From: ghorghor@my-deja.com
Subject: Re: alias mail and script perl
Message-Id: <8gimgi$psf$1@nnrp1.deja.com>
In article <vBSW4.852$6T1.139095@news.dircon.co.uk>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> [ dejeopardised ]
>
> On Wed, 24 May 2000 14:19:13 GMT, ghorghor@my-deja.com Wrote:
> > In article <%FNW4.804$6T1.133153@news.dircon.co.uk>,
> > Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> >> On Wed, 24 May 2000 08:11:31 GMT, ghorghor@my-deja.com Wrote:
> >> > hello
> >> >
> >> > i m working on an unix system.
> >> >
> >> > I ve created an alias in the file aliases like this :
> >> >
> >> > test_mailing : "|/usr/local/.../script.pl"
> >> >
> >> > the script should recieve the mail through stdin but it doesn t
work
> >> >
> >>
> >> In what way doesnt it work ? Any number of things could be wrong
and
> >> only a few of them might have anything to do with Perl.
> >>
> >
> > i send a mail from an other computer on Windows
> >
> > i recieve an mail error like this :
> >
> > The following addresses had permanent fatal errors -----
> > "|/usr/local/.../Mliste.pl"
> > (expanded from: <test_mailing@jeuxvideo.com>) ----- Transcript of
> > session follows -----sh: /usr/local/.../Mliste.pl: not found554
> >
> > "|/usr/local/.../Mliste.pl"... unknown mailer error 1
> >
> >
> > the script is chmod 777 and is in the right directory
> >
>
> Then you might have an error in your program - what happens when you
> run the program from the command line.
>
it work very well
the script juste create or write a file like tutu.txt
the script and the file and chmod 777
> /J\
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 25 May 2000 10:59:20 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: array within array revisited
Message-Id: <392CEB68.E362442B@ife.ee.ethz.ch>
Tk Soh wrote:
> If you really can do nothing but print, then you should look at
> Data::Dumper. Unless you are so eager to meet the challenge to 'print'
> complex Perl data structures. Using Data::Dumper is one of my debugging
> techniques, not 'prints' :-)
When dealing with *complex* Perl data structures, I have found both the
'x' command and Data::Dumper produce too much output. Print can show the
essential data on a tenth the place.
A good combination would be subs that print the data and can be called
from the debugger.
- Alex
------------------------------
Date: Thu, 25 May 2000 08:59:27 +0300
From: "Elisa Roselli" <e.roselli@volusoft.com>
Subject: Re: Can't Knit Two Files Together
Message-Id: <8giivh$lvt$1@wanadoo.fr>
Larry Rosler a écrit dans le message ...
>Wow! That word must be more common in French than in English. First
>time for me, and I thought I had a large vocabulary. :-)
I think I misspelled it. : -[
>All that $curDir stuff isn't needed, since you could open relative to
>the current directory using only the filename.
God I'm thick! I was supposed to know that.
>Those are each wrong because of precedence. The diagnostic is the
>alternate to a TRUE string, so is never executable.
As Tom pointed out, I put the parentheses in the wrong place. Since
corrected.
>The big problem is here. I presume you want to read the second file one
>line at a time to correspond to the first file, but this is a loop that
>eats up the whole file when first executed.
Is this in the nature of a foreach loop? Indeed, no matter howI twisted and
turned, I kept getting only the last line of my ENGFILE!
>That does too much work, as you are interested in only the first few
>fields. See below.
>chomp(my $lang_var = <STDIN>); # What's with the studlyCaps?
I don't like the underscore, as it's a non-significant extra character to
type. Using a cap to separate the distinct words in a variable name is a
habit I picked up in the Java community on a course last year. A matter of
taste, I guess.
>while (<SAMFILE>) {
> my @sam = split /\|/, $_, 5;
> $sam[1] = $lang_var;
> chomp($sam[3] = <ENGFILE>); # This reads one line only.
> print OUT join '|' => @sam;
>}
>
>Bonne chance!
Oh grrrr! You make it look so easy! I've tried your solution and, in
addition to shortening my program by half, it works. This has put me in a
bad mood rather than a good, but don't worry, it has to do with my
relationship to myself, not to you.
Thanks much for getting me out of the pea soup.
Elisa Roselli
------------------------------
Date: Wed, 24 May 2000 23:57:34 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Can't Knit Two Files Together
Message-Id: <392CCEDE.24D9D6EA@stomp.stomp.tokyo>
Larry Rosler wrote:
> Godzilla! <godzilla@stomp.stomp.tokyo> says...
> Caveats for the unwary:
SNIPPET FROM ORIGINAL POST
__________________________
The substitution of the fourth field is more complicated. It
contains a column of French-language strings which I wish to
substitute with equivalent strings from another file,
extractEng.txt, in a different language (English for the moment).
So, concretely, this is what three records from
a_traduire.exp look like:
***
01ABS02|fr|80|Code client inexistant.||||||
01ABS03|fr|80|Devis client inexistant.||||||
01ABS04|fr|80|Client correspondant à la racine inexistant.|3|C||||
***
And I want that to look like:
***
01ABS02|en|80|Customer Code does not exist.||||||
01ABS03|en|80|Customer Estimate does not exist.||||||
01ABS04|en|80|Customer corresponding to root does not exist.|3|C||||
***
Mr. Rosler, this is why I questioned your code.
I tend to believe you nor anyone else figured
out what is actually wrong. I would bet my bottom
dollar most assumed a problem with your code simply
because I questioned you on this; mere assertion.
It is not your code. It is your lack of setting givens
for your code, your lack of explaining how your code
works, lack of what data bases you are using and, lack
of providing test parameters for replication. This is
remiss and violates standards of any science. This is
arrogantly assumptive, rude and highly lacking in
professionalism.
When I test your code and code of others, I am
objective and fair. I work at giving every benefit
of the doubt and work at trying to get a person's
code to work right before logging it as bad code.
I make an assumption a person's code is right and
my testing techniques are wrong. This is fair,
scientific, professional and most intelligent.
Because you consistently fail to offer explanations,
consistently fail to set your givens, consistently
fail to set parameters, people have to guess and
work hard at figuring out what you are doing. My
guess is, most people won't bother putting out any
effort to test code, but rather announce it correct
or announce it wrong, based on personal bias, favortism
and little, if any, factual data.
"Mere Assertion, Fodder Of Fools."
- Kira
I don't. I play fair and in good sport. I play
on a level field and leave my personal bigotries
in the locker room, or take them into the ring
for a good bout for a blood thirsty audience to
enjoy and take delight.
Here is what I did and, for you personally, I am not
going to bother with givens, test conditions and the
such. None of my considerate explanations this time.
You will have to figure this out, just as I figured
out what you are doing and neglected to post for us.
Tit For Tat, Mr. Rosler.
Godzilla!
"Doesn't matter he posted untested bad code.
His code is an elegant solution."
yeah.. right..
TEST ONE
________
#!/usr/local/bin/perl
print "Content-Type:text/plain\n\n";
chomp(my $lang_var = "en"); # What's with the studlyCaps?
open ENGFILE, 'english.txt' or die "Je ne peux pas ouvrir: $!";
open SAMFILE, 'french.txt' or die "Je ne peux pas ouvrir: $!";
open OUT, '>outfile.txt' or die "Je ne peux pas ouvrir: $!";
while (<SAMFILE>) {
my @sam = split /\|/, $_, 5;
$sam[1] = $lang_var;
chomp($sam[3] = <ENGFILE>); # This reads one line only.
print OUT join '|' => @sam;
}
print "Rosler Test Complete. Check Output File.";
exit;
ENGLISH TEXT
____________
01ABS02|en|80|Customer Code does not exist.||||||
01ABS03|en|80|Customer Estimate does not exist.||||||
01ABS04|en|80|Customer corresponding to root does not exist.|3|C||||
FRENCH TEXT
___________
01ABS02|fr|80|Code client inexistant.||||||
01ABS03|fr|80|Devis client inexistant.||||||
01ABS04|fr|80|Client correspondant à la racine inexistant.|3|C||||
OUTFILE RESULTS
_______________
01ABS02|en|80|01ABS02|en|80|Customer Code does not exist.||||||||||||
01ABS03|en|80|01ABS03|en|80|Customer Estimate does not
exist.||||||||||||
01ABS04|en|80|01ABS04|en|80|Customer corresponding to root does not
exist.|3|C|||||3|C||||
TEST TWO
_________
#!/usr/local/bin/perl
print "Content-Type:text/plain\n\n";
chomp(my $lang_var = "en"); # What's with the studlyCaps?
open ENGFILE, 'english2.txt' or die "Je ne peux pas ouvrir: $!";
open SAMFILE, 'french.txt' or die "Je ne peux pas ouvrir: $!";
open OUT, '>outfile.txt' or die "Je ne peux pas ouvrir: $!";
while (<SAMFILE>) {
my @sam = split /\|/, $_, 5;
$sam[1] = $lang_var;
chomp($sam[3] = <ENGFILE>); # This reads one line only.
print OUT join '|' => @sam;
}
print "Rosler Test Complete. Check Output File.";
exit;
ENGLISH TEXT
____________
|||Customer Code does not exist.||||||
|||Customer Estimate does not exist.||||||
|||Customer corresponding to root does not exist.||||||
FRENCH TEXT
___________
01ABS02|fr|80|Code client inexistant.||||||
01ABS03|fr|80|Devis client inexistant.||||||
01ABS04|fr|80|Client correspondant à la racine inexistant.|3|C||||
TEST TWO PRINTED RESULTS
________________________
01ABS02|en|80||||Customer Code does not exist.||||||||||||
01ABS03|en|80||||Customer Estimate does not exist.||||||||||||
01ABS04|en|80||||Customer corresponding to root does not
exist.|||||||3|C||||
TEST THREE
__________
#!/usr/local/bin/perl
print "Content-Type:text/plain\n\n";
chomp(my $lang_var = "en"); # What's with the studlyCaps?
open ENGFILE, 'english3.txt' or die "Je ne peux pas ouvrir: $!";
open SAMFILE, 'french.txt' or die "Je ne peux pas ouvrir: $!";
open OUT, '>outfile.txt' or die "Je ne peux pas ouvrir: $!";
while (<SAMFILE>) {
my @sam = split /\|/, $_, 5;
$sam[1] = $lang_var;
chomp($sam[3] = <ENGFILE>); # This reads one line only.
print OUT join '|' => @sam;
}
print "Rosler Test Complete. Check Output File.";
exit;
ENGLISH TEXT
____________
Customer Code does not exist.
Customer Estimate does not exist.
Customer corresponding to root does not exist.
FRENCH TEXT
___________
01ABS02|fr|80|Code client inexistant.||||||
01ABS03|fr|80|Devis client inexistant.||||||
01ABS04|fr|80|Client correspondant à la racine inexistant.|3|C||||
TEST THREE PRINTED RESULTS
__________________________
01ABS02|en|80|Customer Code does not exist.||||||
01ABS03|en|80|Customer Estimate does not exist.||||||
01ABS04|en|80|Customer corresponding to root does not exist.|3|C||||
------------------------------
Date: Thu, 25 May 2000 09:58:35 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Can't Knit Two Files Together
Message-Id: <392df4ac.5142462@news.skynet.be>
Godzilla! wrote:
>print "Content-Type:text/plain\n\n";
Just a tip, which may get some people off your back:
print "Content-Type: text/plain\n\n" if $ENV{REQUEST_METHOD};
This will always print that header if the script is used as CGI, and in
99.9999% of all other cases, it won't.
--
Bart.
------------------------------
Date: Thu, 25 May 2000 09:58:38 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Can't Knit Two Files Together
Message-Id: <392ef62a.5524905@news.skynet.be>
Elisa Roselli wrote:
>I have a file called a_traduire.exp that consists of nine fields, separated
>with a pipe character (|). From this, I wish to recover all fields except
>the second and the fourth.
Piece of cake.
>The second field is the same for all records. It
>consists of the hard-coded string "fr", which I would like to be able to
>change to something else, say "en".
Even easier.
>The substitution of the fourth field is more complicated. It contains a
>column of French-language strings which I wish to substitute with equivalent
>strings from another file, extractEng.txt, in a different language (English
>for the moment). So, concretely, this is what three records from
>a_traduire.exp look like:
>***
>01ABS02|fr|80|Code client inexistant.||||||
>01ABS03|fr|80|Devis client inexistant.||||||
>01ABS04|fr|80|Client correspondant à la racine inexistant.|3|C||||
>***
>And I want that to look like:
>***
>01ABS02|en|80|Customer Code does not exist.||||||
>01ABS03|en|80|Customer Estimate does not exist.||||||
>01ABS04|en|80|Customer corresponding to root does not exist.|3|C||||
>***
Ah. I sincerely hope your translations file is relatively small. Since
you seem to be translating error messages, I think it is. Anyway, I
assume the translations file looks like this:
Code client inexistant.|Customer Code does not exist.
Customer Code does not exist.|Customer Estimate does not exist.
Reading the translations file into a hash can go like this:
open(TRANSLAT, 'extractEng.txt')
or die "Cannot open translations file: $!";
while(<TRANSLAT>) {
chomp;
my($fr, $en) = split /\|/;
$translat{$fr} = $en;
}
Now the real meat.
open SAMFILE,"a_traduire.exp"
or die "Je ne peux pas ouvrir: $!";
open OUT, ">traduit2.txt" or die "Je ne peux pas ouvrir: $!";
# prepare to format output:
($\, $,) = ("\n", '|');
select OUT;
And here we go!
while(<SAMFILE>) {
chomp;
my @data = split /\|/;
$data[1] = 'fr';
$data[3] = $translat{$data[3]} || do {
warn "No translation for '$data[3]'";
$data[3];
}
print @data;
}
There. That's it.
--
Bart.
------------------------------
Date: Thu, 25 May 2000 17:15:14 +0800
From: "JL" <ltlau@yahoo.com>
Subject: can't run the perl CGI script.
Message-Id: <392ceedd@news02.imsbiz.com>
Hi,
Can anyone tell me is there anyway that I can run the perl CGI scipt which
is saved in ASCII rather than binary? Cuz' if I saved in ASCII, I can't run
the program....but if I change it in binary, then the program run fine.
I dont' understand why???
Thanks.
------------------------------
Date: Thu, 25 May 2000 09:39:12 +0200
From: "Davide Locci" <dlocci@tiscali.it>
Subject: Compile Perl
Message-Id: <8gila6$13g$1@lacerta.tiscalinet.it>
Hi,
I would like to know if it is possible to create EXE file from Perl. If it
is possible where i ca fine the builder?
thanks Davide
--
-------------
Davide Locci
Tiscali SpA
VOLTrade System Administrator
------------------------------
Date: Thu, 25 May 2000 09:03:40 GMT
From: "Ezio BOnsi" <liberalacasa@libero.it>
Subject: Re: Compile Perl
Message-Id: <M%5X4.44462$EY1.498028@news.infostrada.it>
Davide Locci <dlocci@tiscali.it> wrote in message
8gila6$13g$1@lacerta.tiscalinet.it...
> Hi,
>
> I would like to know if it is possible to create EXE file from Perl. If it
> is possible where i ca fine the builder?
>
> thanks Davide
>
> --
>
> -------------
> Davide Locci
> Tiscali SpA
> VOLTrade System Administrator
>
Esiste Perl2Exe, un compilatore per DOS/Win!
http://www.dynamicstate.com/perl2exe.htm
There is Perl2Exe, a DOS/Win compiler!
http://www.dynamicstate.com/perl2exe.htm
Ciao,
Ezio BOnsi
------------------------------
Date: Thu, 25 May 2000 05:12:06 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: email poser
Message-Id: <B5522E65.4B72%elaine@chaos.wustl.edu>
in article 392bbac3.0@nnrp1.news.uk.psi.net, David Fleet at
dfleet@avaterra.com quoth:
> Anyone know why only 300 or so emails get through when I do a mass email to
> myself?
Not that I really care to assist a spammer...but have you thought of
checking your mail spool and/or the filesystem it resides upon? Checked your
maillog? Run sendmail in debug mode? sendmail has an extensive array of
debugging and diagnostic options which are explained in the manpage. This
isn't a Perl problem.
e.
------------------------------
Date: Thu, 25 May 2000 05:33:41 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: email poser
Message-Id: <B5523374.4B79%elaine@chaos.wustl.edu>
in article hhWW4.86486$h01.625659@news1.rdc1.mi.home.com, Clinton A. Pierce
at clintp@geeksalad.org quoth:
> [Posted and mailed]
Ha! his spool is probably full darling :)
> You have no delays in this code at all. Keep in mind too that sendmail
> will queue but not send mail if the system gets too busy.
Well it cannot queue it if the filesystem doesn't have anymore space :) If
it queued them all he would have eventually received them. sendmail -bp will
tell you what's in the queue. A quota will bitch [ almost always ] when the
user approaches zero space so I'm guessing the spool filled the filesystem.
He could find this out by reading the system/mail logs. If he isn't root,
well, he'll probably be getting a nice email from his friendly local system
administrator.
> BTW, if you're a spammer: I hate you and you can die a slow, miserable death
> and your unburied corpse can rot in a tropical sunshine while being eaten by
> mongrel rabid dogs with tapeworms.
/me makes a note to make sure not to send clint more than 2 copies of any
given email :) btw - I think maggots would pick the bones clean as tapeworms
are parasites who feed on live hosts, not corpses.....
e.
------------------------------
Date: 25 May 2000 04:50:19 GMT
From: dj3vande@student.math.uwaterloo.ca (Dave Vandervies)
Subject: Re: Finding IP addresses+
Message-Id: <8gibeb$jf7$1@watserv3.uwaterloo.ca>
In article <Pine.LNX.4.21.0005242203450.22671-100000@hawk.ce.mediaone.net>,
Andrew N. McGuire <anmcguire@ce.mediaone.net> wrote:
>On 24 May 2000, Dave Vandervies wrote:
>
>+ In article <8ghjgl$k4l$1@spinner.corpeast.baynetworks.com>,
>+ Brandon Metcalf <bmetcalf@baynetworks.com> wrote:
>+ > > I can generally find something interesting at this URL, although some
>+ > > browsers don't work properly with it.
>+ > >
>+ > > http://3427256387/
>+ >
>+ >I tried searching a few places but didn't come up with anything. How
>+ >do these purely numerical addresses translate to the octet addresses?
>+
>+ Write it in hex, and then just put dots between the octets. Converting
>+ the individual octets from hex back to decimal might make it easier to
>+ recognize.
>
>Huh? 3427256387 in hex is 0xcc47c843!!!
Write in hex:
cc47c843
Put dots between the octets:
cc.47.c8.43
Convert the individual octets back to decimal to aid recognition:
204.71.200.67
>This will do the job:
>
<perl script snipped>
>
>Outputs:
>
>204.71.200.67
Looks the same to me.
dave
--
Dave Vandervies
dj3vande@student.math.uwaterloo.ca
If ignorance is bliss, why aren't more people happy?
------------------------------
Date: Thu, 25 May 2000 05:31:34 GMT
From: happyhippi@my-deja.com
Subject: FORM: how to get many results..?
Message-Id: <8gidrn$j6s$1@nnrp1.deja.com>
Hey,
I was wondering how to get many results with same name, like:
<input type=checkbox name=box1 value=1> [ ]
<input type=checkbox name=box1 value=1> [ ]
.
.
and so on..
Is this even possible or do I have to name those inputs with different
name? I figured out to get them into array or smth..
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 24 May 2000 23:10:40 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: FORM: how to get many results..?
Message-Id: <392CC3E0.FD1894F8@vpservices.com>
happyhippi@my-deja.com wrote:
>
> Hey,
> I was wondering how to get many results with same name, like:
>
> <input type=checkbox name=box1 value=1> [ ]
> <input type=checkbox name=box1 value=1> [ ]
> .
> .
> and so on..
>
> Is this even possible or do I have to name those inputs with different
> name? I figured out to get them into array or smth..
Yes, that is the right way to do it on the form, keep all the checkboxes
with the same name.
If you are not already doing so, use the CGI.pm module to handle the
form data. With that you get your array of checkbox info like this:
my @array = param('box1');
If it turns out there is only one checked, it will end up being an array
of one, so no loss.
--
Jeff
------------------------------
Date: 25 May 2000 07:04:38 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help needed with SNPP!!!!!!!!!!!!!!
Message-Id: <8gifpm$q57$1@orpheus.gellyfish.com>
On Wed, 24 May 2000 11:13:50 -0500 Mohammad Khan wrote:
> Hi,
> Is there any way to send multi choice responses through Perl SNPP
> module. For example, I want to send a message to my 2 way skytel pager with
> multiple choices response, so that skytel user will choose one of the
> responses and email it back to me.
>
Does SNPP support this at all ? You will probably want to consult
the documentation for your pager or a newsgroup about pagers for a
reliable answer as this is more a question about what you need to
send than how you would implement it.
/J\
--
A boy without mischief is like a bowling ball without a liquid center.
--
fortune oscar homer
------------------------------
Date: Thu, 25 May 2000 05:23:58 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: How do you receive mail with sendmail?
Message-Id: <B552312C.4B78%elaine@chaos.wustl.edu>
in article 392c6e1e_1@news3.calweb.com, Mace at mace@calweb.com quoth:
> I understand how to send mail using sendmail, but how would you receive it
> and save it to a text file?
There is this thing called a daemon that listens to port 25..it's called
sendmail because it SENDS mail but it also receives mail as a bonus when it
is used with the -bd option. It's also an Mail Transport Agent (MTA). So,
receiving mail isn't the bailiwick of Perl until it is delivered to the
user, from there you can use something like procmail to process the
delivered mail in any number of ways.
http://www.procmail.org/
or you could use
http://search.cpan.org/search?dist=Mail-Audit
e
.
------------------------------
Date: Thu, 25 May 2000 09:58:25 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How to read a float type data?
Message-Id: <392cf346.4784187@news.skynet.be>
Jian Lin wrote:
>How can I read a float type data from a text file using Perl script.
>For example, a text file contains three data: 129 3.44 7.5
>I want to read the third data(7.5)
>Is it possible to convert the ASCII code(7.5) into a float type variable ?
It's not only possible, it's even trivial. Perl will convert the string
into a number, all you have to do is USE the string as a number.
Example:
print "12" + "34";
This prints 46, not 1234.
--
Bart.
------------------------------
Date: Thu, 25 May 2000 05:16:21 GMT
From: benxx@my-deja.com
Subject: Insert textarea data into mysql text field
Message-Id: <8gicut$ip0$1@nnrp1.deja.com>
I have trouble inserting textarea data into mysql's text field. In the
perl program I can always get the right content that user types in. But
when I try to insert it into mysql through DBI, it fails from time to
time. It seems to have sth to do with line breaks in the field but I am
not sure... I tried to increase max_allow_packet to a very large number
but it still doesn't work.
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 24 May 2000 23:07:33 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Insert textarea data into mysql text field
Message-Id: <392CC325.725762B1@vpservices.com>
benxx@my-deja.com wrote:
>
> I have trouble inserting textarea data into mysql's text field. In the
> perl program I can always get the right content that user types in. But
> when I try to insert it into mysql through DBI, it fails from time to
> time. It seems to have sth to do with line breaks in the field but I am
> not sure... I tried to increase max_allow_packet to a very large number
> but it still doesn't work.
It may have to do with the data type of the column you are trying to
insert it into. Can it take large amounts of text?
It may also have to do with quote marks inside the text you are trying
to insert. Make sure that you always use placeholders when you do the
insert:
my $sth = $dbh->prepare("INSERT INTO foo VALUES (?,?)");
$sth->execute(name,$text);
If you still have problems, you'll have to show us your code.
--
Jeff
------------------------------
Date: Thu, 25 May 2000 09:55:01 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Insert textarea data into mysql text field
Message-Id: <959244994.3253.0.nnrp-07.c3ad6973@news.demon.co.uk>
benxx@my-deja.com wrote in message <8gicut$ip0$1@nnrp1.deja.com>...
>I have trouble inserting textarea data into mysql's text field. In the
>perl program I can always get the right content that user types in. But
>when I try to insert it into mysql through DBI, it fails from time to
>time. It seems to have sth to do with line breaks in the field but I am
>not sure... I tried to increase max_allow_packet to a very large number
>but it still doesn't work.
>
>Thanks
what about " it's Mysql's single quote problem " try typing that into a text
box.
This escapes quotes (and other nasties) and puts quotes around the string:-
$input_with_quotes_escaped=$dbi->quote($input);
------------------------------
Date: Wed, 24 May 2000 22:04:28 -0700
From: "P.V.Subramanian" <pvsubramanian@email.msn.com>
Subject: Mysql Perl DBI/DBD
Message-Id: <#gWV2agx$GA.314@cpmsnbbsa09>
Hi,
I have
Perl: Active state perl 5.005_03 binary
build 522
MySQL server 3.22.34 build for Win95/Win98
PC Intel Pentium 133Mhz running
Windows 98
My question is where to get the Perl DBI and PerlDBD for mysql and how to
install in the PC.
Thanks in anticipation,
P.V.Subramanian
------------------------------
Date: Wed, 24 May 2000 23:03:12 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Mysql Perl DBI/DBD
Message-Id: <392CC220.B2A7990@vpservices.com>
"P.V.Subramanian" wrote:
>
> Hi,
> I have
> Perl: Active state perl 5.005_03 binary
> build 522
> MySQL server 3.22.34 build for Win95/Win98
> PC Intel Pentium 133Mhz running
> Windows 98
> My question is where to get the Perl DBI and PerlDBD for mysql and how to
> install in the PC.
Your version of activePerl came with a program called PPM (perl package
manager) and instructions on how to use it. In most cases "ppm install
DBI" and "ppm install DBD-mysql" should be all you need to do. That
will download and install the modules for you. If it doesn't, looup up
the documentation on PPM to see what you might need to tweak.
--
Jeff
------------------------------
Date: Thu, 25 May 2000 08:56:35 +0100
From: Richard Hardicre <rhardicr@ford.com>
Subject: Re: newbie question - dbi:mysql
Message-Id: <392CDCB3.3E0AB73B@ford.com>
Jon Andrew wrote:
>
> Forgive me if this is blindingly obvious - probably a case of wood not being
> seen for the trees.
>
> I am writing a script to insert values into a Mysql database using dbi from
> an html form. The script is at a point where it inserts the values ok,
> however I would like to verify that the sql insert statement has completed
> successfully. How do I do this? Is it via the Do () function? If so how do I
> access the rows affected information? I have just noted that $rv is returned
> by Do() would I just need to print the content of the variable?
>
> I would also be grateful if somebody could point me in the direction of a
> good online dbi tutorial/information - I have looked at the 'official FAQ'
> but that didn't really help me on this occasion.
>
> Many thanks.
just check the value of the return code on the way out:
try:
$sth->prepare(blah);
my $rc = $sth->execute;
if ($rc eq '0E0') {
print "failed\n";
}
Richard H
------------------------------
Date: Thu, 25 May 2000 07:15:52 GMT
From: Agi <agi@feib.com.tw>
Subject: Re: Newbie-- Sendmail
Message-Id: <8gijv1$n9i$1@nnrp1.deja.com>
Vladimir,
Thanks for your suggestions !!
I download and install the sender.pm.
When I try the simple example from the DOC,
I got the error message:
Use of uninitialized value in socket at
E:/Perl/site/lib/Mail/Sender.pm line 442.
socket() faile.
Could you tell me how to debug or what's the next step ??
Thanks in advance !!
In article <8ggh3l$29kg$1@storm.comstar.ru>,
"Vladimir Rybintsev" <vlad@soft-tronik.ru> wrote:
> Look at CPAN for Sender.pm
>
> Agi <agi@feib.com.tw> wrote
> > Hello,theres
> > I want to sent a HTML file to someone using Perl.
> > Which module can achieve my goal ??
> >
> > ps.I'm new in Perl.
> >
> > Best Regards,
> > Agi Chen
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 25 May 2000 07:00:27 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie-- Sendmail
Message-Id: <8gifhr$pc5$1@orpheus.gellyfish.com>
On Wed, 24 May 2000 04:58:21 GMT Agi wrote:
> Hello,theres
> I want to sent a HTML file to someone using Perl.
> Which module can achieve my goal ??
>
> ps.I'm new in Perl.
>
MIME::Lite.
You probably want to look at <http://search.cpan.org>
/J\
--
I am so smart, I am so smart, s-m-r-t....I mean s-m-A-r-t.
--
fortune oscar homer
------------------------------
Date: 24 May 2000 21:18:29 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: opinion on libwww
Message-Id: <8ghdel$mbr$1@orpheus.gellyfish.com>
On Wed, 24 May 2000 01:19:37 GMT arpith@my-deja.com wrote:
>
>> > I am planning on snatching a lot of URLs, simultaneously, and
> quickly.
>> > Is this the best method ?
>>
>> Don't neglect the Robot Rules. Cheers!
>>
>
> Are there any laws ? :)
>
<http://info.webcrawler.com/mak/projects/robots/robots.html>
/J\
--
Me lose brain? Uh, oh! Ha ha ha! Why I laugh?
--
fortune oscar homer
------------------------------
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 3157
**************************************