[15867] in Perl-Users-Digest
Perl-Users Digest, Issue: 3280 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 7 18:10:41 2000
Date: Wed, 7 Jun 2000 15:10:30 -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: <960415830-v9-i3280@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 7 Jun 2000 Volume: 9 Number: 3280
Today's topics:
Re: HTTPS with LWP warakurna@my-deja.com
Re: HTTPS with LWP jalutz@papl.com
Re: Inverse video? <gellyfish@gellyfish.com>
Re: IP/Port check <rootbeer@redcat.com>
Re: localtime <latsharj@my-deja.com>
Re: localtime <lr@hpl.hp.com>
Re: localtime <abe@ztreet.demon.nl>
missing deps? <jagipson@pnplus.com>
Moving from Unix to NT - sending mail (Ben Hambidge)
Re: Net::Ping keeps returning 0? adrian2001@my-deja.com
New Window <steve@gte.net>
Newbie.. Sorry.. <rony@odyssee.net>
Re: Newbie.. Sorry.. <makarand_kulkarni@My-Deja.com>
Re: Newbie.. Sorry.. <lauren_smith13@hotmail.com>
Re: Newbie.. Sorry.. <care227@attglobal.net>
Re: Newbie.. Sorry.. <raphaelp@nr1webresource.com>
Re: Newbie.. Sorry.. <makarand_kulkarni@My-Deja.com>
Re: Newbie.. Sorry.. <care227@attglobal.net>
Re: Newbie.. Sorry.. (Bart Lateur)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 07 Jun 2000 19:13:38 GMT
From: warakurna@my-deja.com
Subject: Re: HTTPS with LWP
Message-Id: <8hm6t3$79k$1@nnrp2.deja.com>
What operating systerm are you running? I'm trying to use Perl to access a
https site as well. I'm having problems installing OpenSSL version 0.9.5a.
Basically, I don't know how to compile it in MS VC++ 5.0. The documentation
tells me:
Then from the VC++ environment at a prompt do:
> nmake -f ms\ntdll.mak
I don't know how to get to a prompt in VC++. Maybe once I get past this
hurdle I may be able to help you with your problem.
In article <Pine.BSF.4.21.0006071012350.79067-100000@king.cts.com>,
Jason Brown <jrbrown@cts.com> wrote:
>
> I am writing a PERL script to fetch a web page encrypted by SSL.
>
> I installed:
>
> libwww-perl version 5.48
> Crypt:SSLeay version 0.16
> OpenSSL version 0.9.5a
>
> I tried the "test script" in the documentation:
>
> use LWP::UserAgent;
>
> my $ua = LWP::UserAgent->new;
> my $req = HTTP::Request->new(GET => 'https://www.helsinki.fi/');
> my $res = $ua->request($req);
> if ($res->is_success) {
> print $res->as_string;
> } else {
> print "Failed: ", $res->status_line, "\n";
> }
>
> I got the following error:
>
> Failed: 500 Can't connect to www.helsinki.fi:443 (Bad file number)
>
> What am I doing wrong?????
>
> Jason Brown
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 07 Jun 2000 20:25:35 GMT
From: jalutz@papl.com
Subject: Re: HTTPS with LWP
Message-Id: <8hmb3b$hgg$1@nnrp1.deja.com>
What operating systerm are you running? I'm trying to use Perl to
access a https site as well. I'm having problems installing OpenSSL
version 0.9.5a. Basically, I don't know how to compile it in MS VC++
5.0. The documentation tells me:
Then from the VC++ environment at a prompt do:
> nmake -f ms\ntdll.mak
I don't know how to get to a prompt in VC++. Maybe once I get past this
hurdle I may be able to help you with your problem.
Jon
In article <Pine.BSF.4.21.0006071012350.79067-100000@king.cts.com>,
Jason Brown <jrbrown@cts.com> wrote:
>
> I am writing a PERL script to fetch a web page encrypted by SSL.
>
> I installed:
>
> libwww-perl version 5.48
> Crypt:SSLeay version 0.16
> OpenSSL version 0.9.5a
>
> I tried the "test script" in the documentation:
>
> use LWP::UserAgent;
>
> my $ua = LWP::UserAgent->new;
> my $req = HTTP::Request->new(GET => 'https://www.helsinki.fi/');
> my $res = $ua->request($req);
> if ($res->is_success) {
> print $res->as_string;
> } else {
> print "Failed: ", $res->status_line, "\n";
> }
>
> I got the following error:
>
> Failed: 500 Can't connect to www.helsinki.fi:443 (Bad file number)
>
> What am I doing wrong?????
>
> Jason Brown
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 7 Jun 2000 20:47:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Inverse video?
Message-Id: <8hm8t6$m97$1@orpheus.gellyfish.com>
On 06 Jun 2000 10:08:55 -0500 Tony Curtis wrote:
>>> On Mon, 05 Jun 2000 19:39:49 GMT,
>>> dont@want.spam.com (Xebeche) said:
>
>> Perhaps this is a dumb question, but I'm a newbie so I
>> don't know any better: how (if possible) do you write to
>> STDOUT in reverse video? I need to highlight some info
>> in my listings...
>
> use Term::ANSIColor qw(:constants);
> $Term::ANSIColor::AUTORESET = 1;
> print REVERSE "This is in reverse\n";
>
> perldoc Term::ANSIColor, avaialble from CPAN.
>
Or even :
perl -e 'print "\c[[7mTEst\c[[0m"'
Term::ANSIColor is part of the standard distribution from 5.6.0
/J\
--
Your lives are in the hands of men no smarter than you or I, many of
them incompetent boobs. I know this because I worked alongside them,
gone bowling with them, watched them pass me over for promotions time
and again. And I say... This stinks!
--
fortune oscar homer
------------------------------
Date: Wed, 07 Jun 2000 10:56:06 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: IP/Port check
Message-Id: <Pine.GSO.4.10.10006071051270.10286-100000@user2.teleport.com>
On Sat, 3 Jun 2000, Helza wrote:
> Newsgroups: alt.comp.perlcgi.freelance, comp.lang.perl,
> comp.lang.perl.misc, comp.lang.perl.moderated
If your news administrator still carries comp.lang.perl, please let him
or her know that that newsgroup has not existed since 1995. If you
have such an outdated newsgroup listing, you are probably missing out
on many other valid newsgroups as well. You'll be doing yourself and
many others a favor to use only comp.lang.perl.misc (and other valid
Perl newsgroups) instead.
> But as soon as a invalid IP/port is entered or the server is down the
> program will load like crazy but nothing happens for a long time, until
> after a long time it finally gives any form of error.
I'm not sure what you're saying here. Perhaps you should try to cut your
problem down to a short self-contained example program that shows what you
mean.
> How do i make a quick ip/port check to see if the server is online?
Perhaps you want to have a timeout on opening a socket to a certain port?
Of course, that's not Perl-specific; you can do that in C or another
language as well. So you may be able to get help from another source, if
that's the case.
I regret that I don't have the time to read and check the (somewhat long)
code that you posted. But if you can make it short enough, or make your
request a little clearer, someone may be able to help you.
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Jun 2000 19:44:30 GMT
From: Dick Latshaw <latsharj@my-deja.com>
Subject: Re: localtime
Message-Id: <8hm8mp$fio$1@nnrp1.deja.com>
In article <8hlu8k$cva$1@usenet01.srv.cis.pitt.edu>,
"J. Joseph Yusko" <boogiemonster@usa.net> wrote:
> > did you try
> >
> > my($date)=join("-", ((split(/\s+/,
> scalar(localtime(time()))))[0,1,2,4,3]));
> >
> yes but gave me a message saying...
> (The filename, directory name, or volume label syntax is incorrect)
The following works on my box:
my $str = join '-' ,( split /\s+/ ,scalar localtime)[0,1,2,4,3];
--
Regards,
Dick
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 7 Jun 2000 13:10:40 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: localtime
Message-Id: <MPG.13a84c17ab43263b98ab3b@nntp.hpl.hp.com>
In article <8hlu8k$cva$1@usenet01.srv.cis.pitt.edu> on Wed, 7 Jun 2000
12:42:53 -0700, J. Joseph Yusko <boogiemonster@usa.net> says...
>
> "Xavier Tardy" <xavier.tardy@alcatel.fr> wrote in message
> news:393E75DB.8F92FCD0@alcatel.fr...
> > "J. Joseph Yusko" wrote:
> >
> > > can anyone assist me with this problem. I have the following line of
> > > code.
> > > my($date)=join("-", ((split(/\s+/, scalar(localtime)))[0,1,2,4]));
> > > and appears as Wed-Jun-7-2000. I'd also like to append the time. how
> > > would i go about that? any help would be greatly apprecated.
> >
> > did you try
> >
> > my($date)=join("-", ((split(/\s+/,
> > scalar(localtime(time()))))[0,1,2,4,3]));
> >
> yes but gave me a message saying...
> (The filename, directory name, or volume label syntax is incorrect)
>
> when i remove the 3 works but the does not append the time.
Where does a message like that come from? There is no error message
like that in perldiag. How can it have anything to do with that Perl
statement?
I tried it without all the superfluous punctuation and defaults, and it
worked fine.
my $date = join '-' => (split /\s+/ => localtime)[0 .. 2, 4, 3];
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 07 Jun 2000 22:57:17 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: localtime
Message-Id: <a6dtjs48r7c2nieb05qrj0s9qg5bb3ir7t@4ax.com>
On Wed, 7 Jun 2000 11:43:32 -0700, "J. Joseph Yusko"
<boogiemonster@usa.net> wrote:
> can anyone assist me with this problem. I have the following line of code.
> my($date)=join("-", ((split(/\s+/, scalar(localtime)))[0,1,2,4]));
> and appears as Wed-Jun-7-2000. I'd also like to append the time. how would
> i go about that? any help would be greatly apprecated.
>
my $date = join '-', (split ' ', +localtime)[0,1,2,4,3];
--
Good luck,
Abe
------------------------------
Date: Wed, 7 Jun 2000 16:51:00 -0500
From: "Jeff Gipson" <jagipson@pnplus.com>
Subject: missing deps?
Message-Id: <Inz%4.160731$MB.2996644@news6.giganews.com>
Hash: SHA1
When installing Bundle::CPAN from the cern
prompt, my machine fails the make because
specific dependancies (foo.h) are reported as
missing. I have checked and these dependancies
are in fact right where they should be... I tried
adding the directory with the .h files in my PATH
environement variable. That didn't help either.
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOT7DwxdiUfJw4iToEQIVfQCfesU8Uck4V+Ys4JHTlGaJbJqIpH4AoIA5
KZ7uqEvCrTjj9MbHPjzqbBj2
=7M0+
-----END PGP SIGNATURE-----
------------------------------
Date: Wed, 07 Jun 2000 21:18:51 GMT
From: newsmay2000@ordinate.co.uk (Ben Hambidge)
Subject: Moving from Unix to NT - sending mail
Message-Id: <393ebbbf.6600451@news.nildram.co.uk>
I have to move my CGI script from a Unix web server to a WinNT server.
I send mail by piping to /usr/lib/sendmail using
open(MAIL,"|/usr/lib/sendmail $recipient");
What do I need to do to acheive the same effect in Windows?
------------------------------
Date: Wed, 07 Jun 2000 18:20:02 GMT
From: adrian2001@my-deja.com
Subject: Re: Net::Ping keeps returning 0?
Message-Id: <8hm3o5$c67$1@nnrp1.deja.com>
Same thing happened to me, when I was testing this method.
With one server it worked fine. With the other it returned 0.
The latter is a firewall; this may or may not have to do with the
"wrong" result.
An ugly work-around would be:
$host = "216.147.115.199";
$timeout = 5;
$online = 0;
if ( qx(/usr/sbin/ping $host $timeout) =~ /alive/ ) {
$online = 1;
}
HTH
-------------------------------------------------
In article <8hk2pt$6vc99$1@reader3.wxs.nl>,
"Helza" <xxx@planet.nl> wrote:
> Hi,
>
> After reading some post for the problems i had (pinging a server to
see if
> its online) i got the suggestion to use the net::ping command.
>
> The problem is that i tryed using it but for some unknown reason it
always
> returns 0 to me, even though i'm 100% sure the ip/server is online..
> Nomatter what I try
>
> Any suggestions? :)
>
> I use the following code:
> ----
>
> #!/usr/bin/perl
>
> use Net::Ping;
>
> $host = "216.147.115.199";
> $p = Net::Ping->new();
> $retval = $p->ping($host,5);
> $p->close();
>
> print "Content-type: text/html\n\n";
> print "$retval";
>
> ----------
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 07 Jun 2000 18:35:36 GMT
From: "SteveSingletary" <steve@gte.net>
Subject: New Window
Message-Id: <YBw%4.1226$oH1.100203@dfiatx1-snr1.gtei.net>
Below is sample code to print out an error message:
# Validate Certain Fields
if (not($form_results{'USERID'})) {
print "Content-type: text/html\n\n";
print "Missing USERID\n";
exit;
Question:
Is there any way to make this print out in a new browser window?
Thanks,
Steve
------------------------------
Date: Wed, 07 Jun 2000 15:29:04 -0400
From: Yanik Rondeau <rony@odyssee.net>
Subject: Newbie.. Sorry..
Message-Id: <393EA280.897F0845@odyssee.net>
Please can somebody let me know what I need (software) to start
programming Perl. Which tools / software?
Cheers!
Rony...
------------------------------
Date: Wed, 07 Jun 2000 12:53:19 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Newbie.. Sorry..
Message-Id: <393EA82F.D7A239A7@My-Deja.com>
> Please can somebody let me know what I need (software) to start
> programming Perl. Which tools / software?
all you need is the Perl installation itself!
www.perl.com
--
------------------------------
Date: Wed, 7 Jun 2000 12:43:24 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Newbie.. Sorry..
Message-Id: <8hm8jk$upq$1@brokaw.wa.com>
Yanik Rondeau <rony@odyssee.net> wrote in message
news:393EA280.897F0845@odyssee.net...
> Please can somebody let me know what I need (software) to start
> programming Perl. Which tools / software?
You need a Perl distribution. Go to www.perl.com
Lauren
------------------------------
Date: Wed, 07 Jun 2000 16:11:01 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Newbie.. Sorry..
Message-Id: <393EAC55.7A62F731@attglobal.net>
Makarand Kulkarni wrote:
>
> > Please can somebody let me know what I need (software) to start
> > programming Perl. Which tools / software?
>
> all you need is the Perl installation itself!
> www.perl.com
> --
Can I be snobby and say all you need to program in Perl is perl?
Seriously, all you need is a working perl interpreter and a good
old fashined text editor. I might also go as far as saying you
_need_ "Learning Perl" and "Programming Perl", both by O'Reilly
Publishing, and both wonderfull books.
------------------------------
Date: Wed, 7 Jun 2000 22:18:16 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Re: Newbie.. Sorry..
Message-Id: <8hmal2$k93$1@news.online.de>
maybe you should get "Perl Builder", a really good visual tool to help you
get started! You can download it at www.download.com - I forgot the
company's URL... :-)
Yanik Rondeau <rony@odyssee.net> wrote in message
news:393EA280.897F0845@odyssee.net...
> Please can somebody let me know what I need (software) to start
> programming Perl. Which tools / software?
>
> Cheers!
>
> Rony...
>
------------------------------
Date: Wed, 07 Jun 2000 13:19:30 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Newbie.. Sorry..
Message-Id: <393EAE52.83025B1A@My-Deja.com>
> I might also go as far as saying you
> _need_ "Learning Perl" and "Programming Perl", both by O'Reilly
> Publishing, and both wonderfull books.
Books are not software.
--
------------------------------
Date: Wed, 07 Jun 2000 16:20:48 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Newbie.. Sorry..
Message-Id: <393EAEA0.5593544E@attglobal.net>
Makarand Kulkarni wrote:
>
> > I might also go as far as saying you
> > _need_ "Learning Perl" and "Programming Perl", both by O'Reilly
> > Publishing, and both wonderfull books.
>
> Books are not software.
Well....... you could get the CD bookshelf, and then they are.
But my point was not that these were software, which is why
it was seperated from the main thought. The books are, IMHO,
of great assistance in learning and programming Perl, and worth
inclusion in any discussion of "what one needs to program Perl",
and are in fact a tool, which was a paramater of the origional
poster's request.
------------------------------
Date: Wed, 07 Jun 2000 20:27:16 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Newbie.. Sorry..
Message-Id: <393eaf66.425064@news.skynet.be>
Yanik Rondeau wrote:
>Please can somebody let me know what I need (software) to start
>programming Perl. Which tools / software?
You need Perl. And you need a text editor, preferably one that will
allow you to run external "tools" (=perl) with your current file as a
parameter, and which captures STDOUT and STDERR into a window. Many
"programmer's editors" have this facility. BTW syntax highlighting is
nice, too.
For generic Perl distributions, start looking at <www.perl.com> or
<www.cpan.org>. For Windows32, go directly to <www.activestate.com>.
Er... that's for Perl, not for the text editor.
--
Bart.
------------------------------
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 3280
**************************************