[12259] in Perl-Users-Digest
Perl-Users Digest, Issue: 5859 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 2 11:07:28 1999
Date: Wed, 2 Jun 99 08:00:17 -0700
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, 2 Jun 1999 Volume: 8 Number: 5859
Today's topics:
A Newbie needs HELP! <pathfinder@innocent.com>
Re: bareface ratio (I R A Aggie)
Re: Can't load module DBI, dynamic loading not availabl <gellyfish@gellyfish.com>
Re: empty line <gellyfish@gellyfish.com>
Re: feel like i'm going crazy... <vincent_vanbiervliet@be.ibm.com>
Re: feel like i'm going crazy... <office@asc.nl>
Re: feel like i'm going crazy... <vincent_vanbiervliet@be.ibm.com>
Re: LWP::UserAgent and URL redirect... <gellyfish@gellyfish.com>
microso?t perl <dgris@moiraine.dimensional.com>
Re: Network programming tutoriall? <gellyfish@gellyfish.com>
Re: perl can't find GD Module <gellyfish@gellyfish.com>
Re: Problem with SQL statement in DBI <fruffet@kaptech.com>
Re: Problem with SQL statement in DBI <rhrh@hotmail.com>
req: sendmail specs <office@asc.nl>
Re: req: sendmail specs <anfi@bigfoot.com>
Re: req: sendmail specs <office@asc.nl>
Re: req: sendmail specs <office@asc.nl>
Re: req: sendmail specs <anfi@bigfoot.com>
scalar question: how can you tell the difference betwee <jhilgedi@indiana.edu>
scalar question: how can you tell the difference betwee <jhilgedi@indiana.edu>
Re: scalar question: how can you tell the difference be <vincent_vanbiervliet@be.ibm.com>
Re: SSL - https - CGI - technical question ! <fty@utk.edu>
Using DLL functions in Perl <vincent_vanbiervliet@be.ibm.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 2 Jun 1999 10:05:22 -0400
From: "JJ" <pathfinder@innocent.com>
Subject: A Newbie needs HELP!
Message-Id: <7j3dlh$5buk$1@newssvr04-int.news.prodigy.com>
I have to admit that I know nothing at all about Perl or other programming
languages. However, I've come to realize that to accomplish certain things
in HTML, you really have to use a script like Perl. So I fully intend to
begin learning Perl, but meanwhile I'm stuck with this problem.
Rather than include the HTML in this message, I've posted a page on the web
which is an example of what I'm trying to do. You can look at it, and view
the HTML source at:
http://members.aol.com/bayvideos/example.html
What I want to do is to arrange all the listings on the page alphabetically
by (in this case) the name of the auction. The problem is that each auction
has a description, and I have to make sure when the HTML is rearranged, that
the matching description and anchor are moved together with the name. I've
got about 300 HTML files arranged exactly like this one (and many of them
much longer), so you can see why I don't want to do it manually!
I don't know if this is difficult to do with Perl, or if it's a breeze for
someone who knows the language, but I sure would appreciate any
help/suggestions/advice you can offer.
Many thanks in advance,
JJ
------------------------------
Date: 2 Jun 1999 13:48:49 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: bareface ratio
Message-Id: <slrn7ladoa.po.fl_aggie@thepentagon.com>
On Tue, 01 Jun 1999 16:05:39 -0400, Greg Bartels <gbartels@xli.com>, in
<37543D13.109FD1C8@xli.com> wrote:
+ so, if you have a question, and no one
+ is responding, you can still get the
+ answer, all you have to do is make something
+ up first (bareface it), and the
+ corrections will flood in.
There are better solutions. Time for a repost...
James
-----------begin repost----------somethings are timeless...
Date: 09 Nov 1995 02:57:30 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: system() question
There are a lot of reasons, many of which get repeated over and
over again, many of which don't. Some of the reasons you hear a lot
are: Questions are incoherently phrased. Questions have the form `my
code doesn't work' and don't include the code. Questions include the
code, and it's 200 lines long, and comp.lang.perl is not a debugging
service. Nobody knows the answer to the question. The question is so
badly punctuated that nobody can bear to read it. Questions aer
written by a non-native speaker of English and the native speakers who
are trying to understand it can't. (That's a shame, but it does
happen. I often wish that these people would post in their native
languages. I'd love to see more discussion in languages other than
English. Some Dutch guy tried posting all his comp.lang.c articles in
Dutch a few years ago, and all the Americans flamed him. How
humiliating for me!)
Apart from these oft-mentioned reasons are many others that are
not so often discussed, because anyone who tries to bring them up gets
flamed. But it's the truth: I know the reason I don't answer more
questions is because so many of them questions are so damn stupid.
They're stupid in a lot of different ways, but they're still stupid.
I don't want to suggest that that's why your questions go unanswered.
I don't know what you're asking. No doubt the reason your questions
go unanswered is because they're so deep and interesting that nobody
really knows the answer.
The most common stupid question is the one from someone who has
some high-level problem that they need solved. They have an idea that
they'd like to do it in perl, and they don't really know perl. So
instead of learning perl, they post to comp.lang.perl.misc.
Now don't get me wrong. I don't have any problems answering the
questions of someone who's trying to learn perl. I love THOSE
qusetions. But these people don't seem to be asking useful questions
for that.
Today, for example, I saw a question from a guy who wants to get a
list of hostnames out of nslookup. `How do I do that?' he says. And
it's hard to know what to make of that. What does he mean? Does he
not know how to open a pipe? Is his `open' command failing? What's
going on here? I can't give a useful answer without understanding the
problem. Having your `open' fail is a problem. Wanting to list
hostnames is not a problem; it's a desire.
Here are some similar questions that would have made more sense to me:
1. ``I'm a lazy asshole and I can't be bothered to learn to
program myself, but I know if I post here you'll give me
something for free.''
(OK, fair enough. At least I can send him a rate card.)
2. ``I'm trying to use `open' to talk to nslookup, but...
...here's my code; what's wrong?''
(Good question.)
3. ``I know perl has a `system' command for running programs,
but I can't see how to get my commands into nslookup
once I have run it.''
(Good question.)
4. ``I'm trying to use `getprotobynumber' to talk to nslookup...''
(Good question.)
See, I'm not just biting people's heads off, here. #4 is a good
question, because it gives me something to work with. OK, he has a
very weird idea about interprocess communication, but that's
ignorance, and that's what we're here to correct. He doesn't know
about `open'; I can refer him to the manual.
Here's another example: Some guy wants to assemble a list of email
addresses . ``How do I do that?'' he wants to know. Well, duh. Get a
big pad of paper and read news for a couple days and write down all
the addresses you see. Problem solved. What's it doing in
comp.lang.perl?
Oh, you wanted to do it in perl. Well, I guess I'd open a socket
to the NNTP server and send it some XHDR commands for the `From'
lines. But that's not Perl; you could do that in any language. I
could do it in Bourne Shell for you if I'm allowed to use a little
external thingie to handle the socket parts for me. What's it doing
in comp.lang.perl?
Oh, you wanted us to write the program for you? Wait, let me send
you my rate card.
Someone posted yesterday asking how to get the data from a file
where the start and end of the data is marked by keywords. Same thing
going on here. ``Well, here's how you solve your problem: First you
go take an introductory class in programming and learn to write
programs in some language. Then you go to the bookstore and buy this
book by Wall and Schwartz, it's really good. Read the book carefully
and try out the examples. Then if you still have general questions
like `How do I do this' instead of `I thought that this code would do
X but instead it does Y' you hire a professional to write your program
for you. Or you could just skip right to step 3. Want my rate
card?''
The worst stupid questions are the ones that come from people who
have no business asking them. The most perfect example of this that I
could have imagined was in comp.unix.questions a couple of years ago.
Some guy came and asked how you could tell if a file is a hard link.
My jaw flapped open and it's stayed open since then. I couldn't have
been any more stumped if he'd asked why Bodhidharma came from the
West. What do you say to this guy? Do you tell him the truth, that
all files are hard links, that even symbolic links are hard links?
He's not going to understand you; you might as well keep your mouth
shut. Do you tell him the truth, that the answer won't do him any
good because he doesn't know what a hard link is, so why did he bother
asking in the first place? No, that'll just make him mad. I followed
that message for the next couple weeks, and nobody said anything.
What could you say? The guy had no business asking the question and
no use for the answer. Maybe the right answer would have been to cut
off his finger or something. I dunno.
Some questions get ignored because they're boring. Someone asked
today how to compare two variables (I assumme he means the contents of
those variables) to see if they're exactly the same. You've gotta be
in an awfully good mood to take the time to answer that. Maybe
someone will. Maybe I will.
If I answer that one today, maybe he'll be back tomorrow asking
how to check to see if two variables contain different values. Maybe
I won't. What I find incredible is that if you tell these people to
go read the manual and come back in two weeks, you sometimes get
jumped on for not being helpful to beginners. Bah. If everyone told
these people to go read the manual, they'd eventually figure out that
that's what you have to do ,and then I wouldn't have to spend so much
of my life dealing with incompetent programmers.
Some questions are logically nonsensical because the querent
thinks they know more than they do. A lot of these have the form
``How do I use X to accomplish Y?'' There's nothing wrong with this,
except that sometimes X is a chocolate-covered banana and Y is the
integration of European currency systems. I always get stuck on
these, probably because I can't get rid of the idea that the person
really has a good reason for wanting to use X. I know a half-dozen
easy simple ways to accomplish Y, but I can't imagine what X has to do
with it. This is a problem for me in my day job, too. Clients are
always saying to me ``We want to use product X to do multimedia
development on the world-wide web,'' and all I can think is ``Well,
gee, what would you want to go and do that for?'' Sometimes it turns
out that they want to do it because they want to impress the
manufacturers of X, and I don't work on those jobs.
The flip side of this is a questions like ``I want to accomplish
X, but I don't want to use Y. What can I use instead?'' Which,
again, is sometimes reasonable, and then sometimes X is closing a
filehandle and Y is the `close' function.
The questions I like the best are the ones that go like this:
``I want to accomplish X.
I thought that the following code fragment would do it:
...
But instead it does Y.
Why is that?''
This one is also pretty good:
``I want to accomplish X.
I thought I might be able to use facility Y.
But Y doesn't seem like it's quite right,
because of Z.
What should I use instead of Y, or how can I overcome Z?''
When I ignore these, it's usually because I don't know the answer.
There were an awful lot of them today. It makes me very happy.
There you go; a 160-line dissertation on why questions go unanswered.
Now don't let me hear you saying nobody ever answers your questions.
------------------------------
Date: 2 Jun 1999 13:54:34 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Can't load module DBI, dynamic loading not available in this perl.
Message-Id: <3755298a@newsread3.dircon.co.uk>
Boris Bakulin <bakulin@eximb.kiev.ua> wrote:
> I install modul DBI-1.08
>
> perl Makefile.PL
> make
> make test
> make install
>
> Everything was good, but when i use
> #!/usr/local/bin/perl -w
> use IO::Socket;
> use DBI;
>
>
> answer is:
>
> Can't load module DBI, dynamic loading not available in this perl.
> (You may need to build a new perl executable which either supports
> dynamic loading or has the DBI module statically linked into it.)
> at /usr/local/lib/perl5/site_perl/5.005/i386-sco_sv/DBI.pm line 150
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.005/i386-s
> co_sv/DBI.pm line 150.
>
You will need to build a Perl which will support dynamic loading - however
because you dont make it clear what actual version of SCO you have I
cant tell you whether it is possible :
jns [pigment] $ uname -X
System = SCO_SV
Node = pigment
Release = 3.2v5.0.4
KernelID = 97/05/07
Machine = Pentium
BusType = ISA
Serial = 4EL020857
Users = 5-user
OEM# = 0
Origin# = 1
NumCPU = 1
That one will build a dynamic ELF binary
sys0001 [figment] $ uname -X
System = figment
Node = figment
Release = 3.2v4.2
KernelID = 93/04/28
Machine = i80486
BusType = ISA
Serial = ltd001605
Users = unlim
OEM# = 0
Origin# = 1
NumCPU = 1
That one wont ;-{
I beleive that for those versions of SCO that do support dynamic loading
the 5.005.03 release of Perl has an updated hints file that will aloow
this. Alternatively you could check out :
<http://www.sco.com/skunkware/src/htdocs/perl5.004.04.html>
Which has details of how to build an earlier version - I have actually
got this to work with 5.005.02 as well and succesfully built DBI from
these instructions.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 2 Jun 1999 14:03:05 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: empty line
Message-Id: <37552b89@newsread3.dircon.co.uk>
ramon <ramon@gila.sunion.arizona.edu> wrote:
> HELO:
>
> i have a file containing questions separated by space as such:
> --------------------------------
> 1. Summertime in the Northern Hemisphere is when
>
> 2. Where and when would you look for a nearly new Moon in the sky?
>
> 3. Planet X has a nearly circular orbit and a rotation axis which
> is perpendicular to the plane of its orbit around a star. The seasons
> on Planet X would be
>
> etc....
> ------------------------------
> which i place into an array. some of the questions are more than one
> line and i want to combine these lines and place them into another
> array. i am having trouble checking for these empty lines. what are
> they ie, ('\n')? what can i compare them to?
>
You will want to read about the special variable $/ in the Perlvar
manpage and particularly about 'paragraph mode'.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Wed, 2 Jun 1999 15:48:14 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: feel like i'm going crazy...
Message-Id: <375526a8@news.uk.ibm.net>
Bastiaan S van den Berg <office@asc.nl> wrote in message
news:7j36le$pcs$1@zonnetje.NL.net...
> YEAH!!!
>
> i've found the error
>
> appereantly , you can't include $forms{"name"} within a print string
> so now , i first dump all the $forms{"stuff"} into $stuff and then use
those
> later while checking and mailing
Actually, the problem was more that you've been using quotes within quotes.
In theory you should use quotes in hashes, like in $forms{"stuff"}, because
otherwise
perl complains it found a bareword that could be used for future keywords
(or something),
but in hashes it would assume you meant a literal. So $forms{"stuff"} is
really the same as
$forms{stuff}, and is correct perl...
>
> now it processes it peacefully , but i don't seem to receive email from
it?
>
>
> Bastiaan S van den Berg heeft geschreven in bericht
> <7j3286$lpg$1@zonnetje.NL.net>...
> >ok ok
> >
> >i've tried everything now , but i REALLY can't get this freakin' program
to
> >work..
> >
> >
> >the form it processes is located over @
> >http://www.asc.nl/bedrijf/contact.html
> >
> >check it out , and plz give me your thoughts , suggestions , flames &
> >general comments asap! :)
> >
> >cul8r
> >buZz
> >
> >Internet Specialist
> >Account Software Consultancy
>
>
>
>
>
------------------------------
Date: Wed, 2 Jun 1999 15:44:19 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: feel like i'm going crazy...
Message-Id: <7j3cie$e7$1@zonnetje.NL.net>
Vincent Vanbiervliet heeft geschreven in bericht
<375526a8@news.uk.ibm.net>...
>Bastiaan S van den Berg <office@asc.nl> wrote in message
>news:7j36le$pcs$1@zonnetje.NL.net...
>> YEAH!!!
>>
>> i've found the error
>>
>> appereantly , you can't include $forms{"name"} within a print string
>> so now , i first dump all the $forms{"stuff"} into $stuff and then use
>those
>> later while checking and mailing
>
>Actually, the problem was more that you've been using quotes within quotes.
>In theory you should use quotes in hashes, like in $forms{"stuff"}, because
>otherwise
>perl complains it found a bareword that could be used for future keywords
>(or something),
>but in hashes it would assume you meant a literal. So $forms{"stuff"} is
>really the same as
>$forms{stuff}, and is correct perl...
so i can just use print "blablabla yackyack $forms{name} yackerdeeyack"; ???
>
>>
>> now it processes it peacefully , but i don't seem to receive email from
>it?
------------------------------
Date: Wed, 2 Jun 1999 16:09:20 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: feel like i'm going crazy...
Message-Id: <37552b98@news.uk.ibm.net>
Bastiaan S van den Berg <office@asc.nl> wrote in message
news:7j3cie$e7$1@zonnetje.NL.net...
> so i can just use print "blablabla yackyack $forms{name} yackerdeeyack";
???
Yep. Just try it:
$form{something}='else';
print "Just trying something $form{something}.\n";
------------------------------
Date: 2 Jun 1999 14:01:29 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: LWP::UserAgent and URL redirect...
Message-Id: <37552b29@newsread3.dircon.co.uk>
GEMINI <dennis@info4.csie.nctu.edu.tw> wrote:
> I use LWP::UserAgent to request
> a document from a URL. The response
> is sometimes a redirect message:
>
You nust have missed reading about the redirect_ok method in the
LWP::UserAgent manpage.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 02 Jun 1999 08:59:18 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: microso?t perl
Message-Id: <m3lne2hcmx.fsf@moiraine.dimensional.com>
[subject line intentionally munged to avoid my killfile :-)]
This worries me.
http://www.activestate.com/press/releases/Microsoft.htm
dgris
- thinking about python :-|
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: 2 Jun 1999 14:32:11 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Network programming tutoriall?
Message-Id: <3755325b@newsread3.dircon.co.uk>
Doug O'Leary <dkoleary@mediaone.net> wrote:
>
> Is there a tutorial or something similar that covers the basics of
> network programming - something on the order of the Learning Perl book?
> What variables need to be set, what functions to call, when, etc, etc?
>
If you are on a 4.4 BSD derived sustem then you will have :
/usr/share/doc/psd/20.ipctut
Which is also available at:
<http://docs.freebsd.org/44doc/psd/20.ipctut/paper.html>
There is also an advanced tutorial available.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 2 Jun 1999 13:43:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perl can't find GD Module
Message-Id: <37552706@newsread3.dircon.co.uk>
Walter Pleyer <pleyer@kraftwerk.co.at> wrote:
> Hi folks!
>
> I hope someone can help me with my following problem:
> I downloaded Dave Roth' GD module for Win32 from CPAN, but I can't
> install it properly. I've dumped all the files in the correct
> directories
> according to the README-file, but when I try to run the testscript
> TEST.PL I keep getting the same message:
>
> Can't locate loadable object for module GD in @INC (@INC contains:
> C:\PERL\lib C
> :\PERL\site\lib .) at test.pl line 1
> BEGIN failed--compilation aborted at test.pl line 1.
>
> What's wrong and how can I fix it?
> (I'm using the ActiveState perl for Win32).
>
You cant just install a module like GD like that. It has binary elements
that need to be compiled.
However all is not last. You can install GD simply by typing:
ppm install GD
at your command prompt (assuming you have a network connection and a
half way recent ActiveState Perl).
If you need more information about PPM then you will be able to find
more in the documentation it installed in your start menu.
/j\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Wed, 2 Jun 1999 14:34:03 +0200
From: "Fred Ruffet" <fruffet@kaptech.com>
Subject: Re: Problem with SQL statement in DBI
Message-Id: <7j38c5$5ae$1@gatekeeper.ornano.kapt.com>
John,
>$c = $dbh->prepare("SELECT * INTO OUTFILE $afile FROM $table");
I don't believe that INTO should be used. I think you'd better fetch rows
instead.
Fridiric Ruffet - fruffet@kaptech.com
------------------------------
Date: Wed, 02 Jun 1999 13:08:25 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: Problem with SQL statement in DBI
Message-Id: <37551EB9.F1EE6766@hotmail.com>
john wrote:
>
> Could anyone suggest why
> the following statement does
> not work via DBI?
>
> $c = $dbh->prepare("SELECT * INTO OUTFILE $afile FROM $table");
>
> (works fine via Mysql command line).
>
> John
If $afile is actually a filename I wouldnt expect the prepare to do
anything. I would also expect that you would have to extract your
results first then write them to a file in the standard way, independent
of the DBI interface.
Richard H
------------------------------
Date: Wed, 2 Jun 1999 15:15:24 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: req: sendmail specs
Message-Id: <7j3as2$sij$1@zonnetje.NL.net>
does anyone know a site to , or information about handling the
/usr/lib/sendmail program?
i'm trying to send mail from a perl program with the following commands ,
does anyone have an idea why it won't send mail?
-[= code following =]-
open (MAIL, "|$sendmail -t > /dev/null 2>&1") || die ("Content-Type:
text/html \n\n<html><head>Error opening pipe to $sendMAIL:
$!\n</body></html>\n");
print MAIL ("To: office\@asc.nl , $email \n","Subject: [Site]
Contactformulier. \n");
print MAIL"\n\n";
if ($bedrijf ne "") {print MAIL "Bedrijf : $bedrijf\n";}
/snip/
.
.
/snip/
close(MAIL);
cul8r
buZz
------------------------------
Date: Wed, 02 Jun 1999 15:36:31 +0200
From: Andrzej Filip <anfi@bigfoot.com>
Subject: Re: req: sendmail specs
Message-Id: <3755335E.3427F78A@bigfoot.com>
Bastiaan S van den Berg wrote:
> does anyone know a site to , or information about handling the
> /usr/lib/sendmail program?
>
> i'm trying to send mail from a perl program with the following commands ,
> does anyone have an idea why it won't send mail?
>
> -[= code following =]-
>
> open (MAIL, "|$sendmail -t > /dev/null 2>&1") || die ("Content-Type:
> text/html \n\n<html><head>Error opening pipe to $sendMAIL:
> $!\n</body></html>\n");
> print MAIL ("To: office\@asc.nl , $email \n","Subject: [Site]
> Contactformulier. \n");
> print MAIL"\n\n";
> if ($bedrijf ne "") {print MAIL "Bedrijf : $bedrijf\n";}
> /snip/
> .
> .
> /snip/
> close(MAIL);
>
> cul8r
> buZz
1) Add -oi command line option to sendmail invocation.
2) Check exit code returned by sendmail (close exit code)
--
Andrzej (Andrew) A. Filip
http://www.bigfoot.com/~anfi
E-mail: anfi@bigfoot.com
I NO LONGER USE anfi@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
------------------------------
Date: Wed, 2 Jun 1999 15:37:32 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: req: sendmail specs
Message-Id: <7j3c5d$3l$1@zonnetje.NL.net>
>> i'm trying to send mail from a perl program with the following commands ,
>> does anyone have an idea why it won't send mail?
>
>1) Add -oi command line option to sendmail invocation.
>2) Check exit code returned by sendmail (close exit code)
>
ehm ..
1) what does -oi do ?
2) how would i do that? $returncode = close(MAIL); or something else?
------------------------------
Date: Wed, 2 Jun 1999 15:47:40 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: req: sendmail specs
Message-Id: <7j3coc$ir$1@zonnetje.NL.net>
Andrzej Filip heeft geschreven in bericht <3755335E.3427F78A@bigfoot.com>...
>
>
>Bastiaan S van den Berg wrote:
>
>> does anyone know a site to , or information about handling the
>> /usr/lib/sendmail program?
>>
>> i'm trying to send mail from a perl program with the following commands ,
>> does anyone have an idea why it won't send mail?
>>
>> cul8r
>> buZz
>
>1) Add -oi command line option to sendmail invocation.
>2) Check exit code returned by sendmail (close exit code)
>
i've got sendmail -oi -f office/@asc.nl now , and it still doesn't work..
it looks like no mail gets sent from my server or something
how do i check the error codes of sendmail , could you code some loose code?
tnx
buZz
------------------------------
Date: Wed, 02 Jun 1999 15:57:29 +0200
From: Andrzej Filip <anfi@bigfoot.com>
Subject: Re: req: sendmail specs
Message-Id: <37553849.502FA43B@bigfoot.com>
Bastiaan S van den Berg wrote:
> 1) what does -oi do ?
It disables special treatment of single dot lines
- single dot line usually means end of message,
(all lines starting with a dot are also rewritten)
> 2) how would i do that? $returncode = close(MAIL); or something else?
($returncode=close(MAIL))
die "sendmail exit code: $returncode" if $returncode;
die "undefined exit code" unless defined($returncode);
Some sendmail installations return exit code 75 when the message
is queuened (to be delivered later)
Another option is to run sendmail in verbose mode (-v)
and capture the output (stderr I think)
--
Andrzej (Andrew) A. Filip
http://www.bigfoot.com/~anfi
E-mail: anfi@bigfoot.com
I NO LONGER USE anfi@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
------------------------------
Date: Wed, 2 Jun 1999 09:18:10 -0500
From: "John Hilgedick" <jhilgedi@indiana.edu>
Subject: scalar question: how can you tell the difference between numbers and strings?
Message-Id: <7j3dvj$9c8$1@flotsam.uits.indiana.edu>
I can't find the answer to this question anywhere. Can you help?
I have an array that contains a bunch of integers and strings. I want to
iterate over the array and find particular integers and strings. If I'm
looking for a string I have to use 'eq' - but if I'm looking for a number I
have to use "==". What do I do if I don't know what 'type' one of the
arguments is?
I've noticed that if I read a line from a file and then split the line into
an array, that numbers in the file "become" numbers and non-numbers "become"
strings. For example, if I read the string "57" in from a file, it becomes
the number 57 instead of the string "57". Am I missing something here? Is
there a way to know the type? Is there a way to "force" the type?
Any light you can shed would be appreciated!
-john
------------------------------
Date: Wed, 2 Jun 1999 09:18:10 -0500
From: "John Hilgedick" <jhilgedi@indiana.edu>
Subject: scalar question: how can you tell the difference between numbers and strings?
Message-Id: <7j3e9a$9ck$1@flotsam.uits.indiana.edu>
I can't find the answer to this question anywhere. Can you help?
I have an array that contains a bunch of integers and strings. I want to
iterate over the array and find particular integers and strings. If I'm
looking for a string I have to use 'eq' - but if I'm looking for a number I
have to use "==". What do I do if I don't know what 'type' one of the
arguments is?
I've noticed that if I read a line from a file and then split the line into
an array, that numbers in the file "become" numbers and non-numbers "become"
strings. For example, if I read the string "57" in from a file, it becomes
the number 57 instead of the string "57". Am I missing something here? Is
there a way to know the type? Is there a way to "force" the type?
Any light you can shed would be appreciated!
-john
------------------------------
Date: Wed, 2 Jun 1999 16:31:25 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: scalar question: how can you tell the difference between numbers and strings?
Message-Id: <375530c8@news.uk.ibm.net>
John Hilgedick <jhilgedi@indiana.edu> wrote in message
news:7j3dvj$9c8$1@flotsam.uits.indiana.edu...
> I can't find the answer to this question anywhere. Can you help?
>
> If I'm looking for a string I have to use 'eq'
Correct.
> - but if I'm looking for a number I have to use "==".
No you don't...
Did you ever try using 'eq' with numbers?
> I've noticed that if I read a line from a file and then split the line
into
> an array, that numbers in the file "become" numbers and non-numbers
"become"
> strings. For example, if I read the string "57" in from a file, it
becomes
> the number 57 instead of the string "57". Am I missing something here?
Is
> there a way to know the type? Is there a way to "force" the type?
How can you tell that "57" becomes the number 57?
Usually perl knows how it should treat strings/numbers (let's call them
scalars). For example,
consider following code snippet:
$a='57';
$b=$a.2; # Gives $b=572; $a treated as a string
$c=$b+2; # Gives $c=574; $b treated as a number
$d=$c.2; # Gives $d=5742; $c treated as a string
> Any light you can shed would be appreciated!
>
> -john
>
>
------------------------------
Date: Wed, 02 Jun 1999 07:46:47 -0400
From: Jay Flaherty <fty@utk.edu>
Subject: Re: SSL - https - CGI - technical question !
Message-Id: <375519A7.A98ECDDD@utk.edu>
Alexander Karg wrote:
>
> Hallo
> Im technical administrator of a new e-commerce website and I got a technical
> question:
This question has nothing to do with perl and will be better answered
over on comp.infosystems.www.* newsgroups.
------------------------------
Date: Wed, 2 Jun 1999 15:39:51 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Using DLL functions in Perl
Message-Id: <375524ae@news.uk.ibm.net>
How can I call a DLL function in Perl?
I don't have any source code from the dll (it's an encryption/decryption
algorithm that has to stay secret, even from me :-( ), but
I know the arguments to pass to the function.
I'm using a Win32 platform.
Any suggestions?
Thanks,
Vincent
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 V8 Issue 5859
**************************************