[15857] in Perl-Users-Digest
Perl-Users Digest, Issue: 3270 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 6 21:05:35 2000
Date: Tue, 6 Jun 2000 18: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: <960339916-v9-i3270@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 6 Jun 2000 Volume: 9 Number: 3270
Today's topics:
Re: [HELP] Net::FTP, Mime::Lite and receivers list mitiste@charlie.iit.edu
Re: [Off-topic] Lincoln Stein on Morning Edition! (Mark Badolato)
Re: Accessing a secure server (David Efflandt)
ANNOUNCE: MIME::Lite 2.0 on-line and in CPAN <eryq@zeegee.com>
Anoymous hash slices <tcuffel@exactis.com>
Re: Anoymous hash slices <lr@hpl.hp.com>
Re: Anoymous hash slices <makarand_kulkarni@My-Deja.com>
Re: CGI.pm function list/definitions <@cisco.com>
Re: CGI.pm function list/definitions <@cisco.com>
Re: CGI.pm function list/definitions <makarand_kulkarni@My-Deja.com>
Re: CGI.pm function list/definitions <makarand_kulkarni@My-Deja.com>
Detecting multiple instances under Win32 <menollyNOmeSPAM@spy.net.invalid>
E-mail-based PERL discussion group killerapps@my-deja.com
each not looping on a hash <you.will.always.find.him.in.the.kitchen@parties>
Re: each not looping on a hash <wyzelli@yahoo.com>
Fill In With Spaces Command <steve@gte.net>
Re: Fill In With Spaces Command (Abigail)
Re: Fill In With Spaces Command <makarand_kulkarni@My-Deja.com>
Re: Fill In With Spaces Command <steve@gte.net>
Re: Fill In With Spaces Command <lr@hpl.hp.com>
Re: Fill In With Spaces Command <steve@gte.net>
Re: Fill In With Spaces Command <makarand_kulkarni@My-Deja.com>
Re: Fill In With Spaces Command <lr@hpl.hp.com>
Re: Fill In With Spaces Command <steve@gte.net>
IO::Socket devices <bkennedy@hmsonline.com>
Re: IP/port check help wanted <xxx@planet.nl>
MIME-tools 5.205 uploaded to CPAN <eryq@zeegee.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 06 Jun 2000 17:39:19 -0500
From: mitiste@charlie.iit.edu
Subject: Re: [HELP] Net::FTP, Mime::Lite and receivers list
Message-Id: <c8vqjs0dmv5k4l2omfonceoda7mifbsm1r@4ax.com>
On 6 Jun 2000 19:46:13 GMT, ebohlman@netcom.com (Eric Bohlman) wrote:
>mitiste (mitiste@charlie.iit.edu) wrote:
>: - I parse the file and grab these lines which have the addresses ALWAYS
>: as I expect
>: them (in the proper xxx@yyy.com format - no need to check anything
>: here), and build a list of those:
>:
>: @tolist=(@tolist, $line)
>
>That's a rather inefficient way of doing it, as it has to make an extra
>copy of the whole array each time. Use
>
>push @tolist, $line;
>
>instead.
>
>: - I build then an email message using these addresses for the receiving
>: end:
>:
>: $mime = new MIME::Lite(From => $from,
>: To => [@to],
>: Subject => "$title",
>: Type => 'text/plain',
>: Data => $main_message);
>:
>: and use the second file as an attachment (no need to show the code, this
>: aspect is
>: not relevant to what my problem is).
>:
>: And here comes the story: when running this program under NT version of
>: Perl,
>: all users in the @to list get the message - when running the same
>: program under Perl in
>: Linux, only the FIRST person in the @to list gets it (!!!), even though
>: the message comes
>: to this person with ALL receipients listed in the To: line of the email,
>: comma separated:
>
>You don't show us the part of your code where you actually send the
>message: it sounds like your problem may be related to differences in the
>mail agents you're using to send the mail.
I am using the same SMTP server (the Perl program is unchanged
between Windows and Linux, except for the path of the files). The
lines are similar to:
MIME::Lite->send('smtp', 'smtp.mycompany.com', Timeout=>300);
$mime->send;
where $mime was obviously defined "in my previous post".
------------------------------
Date: 6 Jun 2000 23:48:25 GMT
From: mbadolato@quepasa.com (Mark Badolato)
Subject: Re: [Off-topic] Lincoln Stein on Morning Edition!
Message-Id: <8F4BA1EFFmbadolatoquepasacom@206.165.3.70>
brian@smithrenaud.com (brian d foy) wrote in
<brian-ya02408000R0606000026250001@news.panix.com>:
>http://search.npr.org/cf/cmn/cmnpd01fm.cfm?PrgDate=5%2F30%2F2000&PrgI
>D=3
On a slightly amusing note, elsewhere on that page, they have another
article that starts as follows:
National Nutrition Summit on Obesity (14.4 | 28.8) -- NPR's Rebecca
Perl reports... *snip*
So, two unrelated Perl articles =)
--Mark
------------------------------
Date: 7 Jun 2000 00:10:21 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Accessing a secure server
Message-Id: <slrn8jr4n8.c9q.efflandt@efflandt.xnet.com>
On Mon, 05 Jun 2000 15:45:21 -0400, Rick Meldrum <rjk@fprsdev3.fmr.com> wrote:
>Hi;
>
>I may be barking up the wrong tree here, but I need to access pasword
>protected URL from my script.
>
>Typically I would:
> open a socket,
> "print SOCK" my http request
> while (<SOCK>) to read in the info I'm after.
>
>Problem is, this won't work when a username and password are required.
I hope you also know that there is a differnce between a secure server
(https) and web authentication on a regular server. Authentication on a
regular server is passed as plain text. A secure server uses port 443
instead of port 80 and everything is encrypted.
>Does any one have a workaround?
>
>Or can you recommend a better approach? (I suspect there's a module out
>there...)
The LWP modules are for web access. Although I have not used them since
the Socket method works for my needs and is more available.
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Tue, 06 Jun 2000 16:20:43 -0400
From: Eryq <eryq@zeegee.com>
Subject: ANNOUNCE: MIME::Lite 2.0 on-line and in CPAN
Message-Id: <c6f%4.91710$v7.3375715@news-west.usenetserver.com>
MIME::Lite 2.0 has been uploaded to CPAN. Basics:
* A number of performance enhancements.
* Fixes a Bcc-related bug for people doing SMTP sends
to qmail servers.
* Improved support for message/rfc822 type messages.
* Improved print_body() and stringify_body().
Full change log available at:
http://www.zeegee.com/code/perl/MIME-Lite/docs/MIME/Lite.pm.html#CHANGE_LOG
Latest code, on-line docs, etc. available on:
http://www.zeegee.com/company/perl.html
Enjoy.
------------------------------
Date: Tue, 6 Jun 2000 17:46:31 -0500
From: "Tim" <tcuffel@exactis.com>
Subject: Anoymous hash slices
Message-Id: <4Pf%4.7310$Rx.719913@den-news1.rmi.net>
Is there such a creature?
I have this:
for (@lines)
{
my %hash;
@hash{qw(cost flavor texture)} = split '|';
push @array, \%hash;
}
Not bad. But what I would like is:
@array = map { *some weird anonymous hash slice syntax* = split '|' } @lines;
Or something like that. But I can't even guess what an anoymous hash slice
would look like.
Any ideas?
-T
------------------------------
Date: Tue, 6 Jun 2000 17:08:28 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Anoymous hash slices
Message-Id: <MPG.13a73254c859a91f98ab2f@nntp.hpl.hp.com>
In article <4Pf%4.7310$Rx.719913@den-news1.rmi.net> on Tue, 6 Jun 2000
17:46:31 -0500, Tim <tcuffel@exactis.com> says...
> Is there such a creature?
>
> I have this:
>
> for (@lines)
> {
> my %hash;
>
> @hash{qw(cost flavor texture)} = split '|';
> push @array, \%hash;
> }
>
> Not bad. But what I would like is:
>
> @array = map { *some weird anonymous hash slice syntax* = split '|' } @lines;
>
> Or something like that. But I can't even guess what an anoymous hash slice
> would look like.
>
> Any ideas?
To begin with, I'd examine carefully the argument for your splits.
Remember that no matter how you choose to write it, it is a regex, not a
string.
Damn, I wish there were a warning for a string literal used as a split()
operator. Maybe if it included any unescaped regex metacharacter.
As for the question you actually asked, I don't think it would be any
better than your loop, because you need two different accesses to the
hash.
@array = map { my %hash;
@hash{qw(cost flavor texture)} = split /\|/; \%hash } @lines;
or, equivalently,
@array = map { my $href = { };
@$href{qw(cost flavor texture)} = split /\|/; $href } @lines;
or, differently,
@array = map { my @a = split /\|/;
{ cost => $a[0], flavor => $a[1], texture => $a[2] } } @lines;
But I'm willing to be enlightened.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 06 Jun 2000 17:25:03 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Anoymous hash slices
Message-Id: <393D965F.2B26738D@My-Deja.com>
> Is there such a creature?
>
> I have this:
>
> for (@lines)
> {
> my %hash;
>
> @hash{qw(cost flavor texture)} = split '|';
> push @array, \%hash;
> }
>
> Not bad. But what I would like is:
>
> @array = map { *some weird anonymous hash slice syntax* = split '|' } @lines;
snippet:
use Data::Dumper ;
@v = map { {'key1'=> (split)[0], 'key2'=> (split)[1], 'key3'=> (split)[2]} } <DATA>
;
print Dumper \@v;
__DATA__
1 2 3
4 5 6
------------------------------
Date: Tue, 06 Jun 2000 17:39:00 -0700
From: Badari Kakumani <@cisco.com>
Subject: Re: CGI.pm function list/definitions
Message-Id: <393D99A4.C7A19CED@cisco.com>
i could follow which book is being referred to in this enclosed
article. can someone help?
thanks,
-badari
Mur wrote:
>
> Let me also add that if you expect to do any *significant* work
> in CGI.pm (beyond a simple form-handler, say), the book is
> *essential*. Well worth the $20-$25 or so.
>
> Jeff Boes//ICQ=3394914//Yahoo!=jeffboes//AOL IM=jboes
> //home=jboes@qtm.net//professional=mur@consultant.com
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Tue, 06 Jun 2000 17:39:51 -0700
From: Badari Kakumani <@cisco.com>
Subject: Re: CGI.pm function list/definitions
Message-Id: <393D99D7.A6320D6B@cisco.com>
i could follow which book is being referred to in this enclosed
article. can someone help?
thanks,
-badari
Mur wrote:
>
> Let me also add that if you expect to do any *significant* work
> in CGI.pm (beyond a simple form-handler, say), the book is
> *essential*. Well worth the $20-$25 or so.
>
> Jeff Boes//ICQ=3394914//Yahoo!=jeffboes//AOL IM=jboes
> //home=jboes@qtm.net//professional=mur@consultant.com
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Tue, 06 Jun 2000 17:43:56 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: CGI.pm function list/definitions
Message-Id: <393D9ACC.B11E89DC@My-Deja.com>
Badari Kakumani wrote:
> i could follow which book is being referred to in this enclosed
> article. can someone help?
>
Official Guide to Programming With Cgi.Pm
by Lincoln Stein
------------------------------
Date: Tue, 06 Jun 2000 17:44:05 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: CGI.pm function list/definitions
Message-Id: <393D9AD5.CD76D440@My-Deja.com>
Badari Kakumani wrote:
> i could follow which book is being referred to in this enclosed
> article. can someone help?
Official Guide to Programming With Cgi.Pm
by Lincoln Stein
------------------------------
Date: Tue, 06 Jun 2000 17:03:00 -0700
From: menolly <menollyNOmeSPAM@spy.net.invalid>
Subject: Detecting multiple instances under Win32
Message-Id: <27dce54a.258f01b5@usw-ex0103-086.remarq.com>
Using ActiveState on NT, I need to detect if an instance of a
particular script is already running. Is this even possible?
--Cathy Mullican
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Tue, 06 Jun 2000 22:58:03 GMT
From: killerapps@my-deja.com
Subject: E-mail-based PERL discussion group
Message-Id: <8hjvlj$pvg$1@nnrp1.deja.com>
To subscribe, send mail to
list@claustrophobic.com
and in the body of the message, put
join perl
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 7 Jun 2000 12:33:54 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: each not looping on a hash
Message-Id: <960337929.25694@shelley.paradise.net.nz>
This one is driving me nuts.
I have a simple hash that maps a URL path to a directory, ie:
%URLMappings= (
'~fred', '/home/fred/public_html',
);
In one of my subroutines, it does not even run through the while loop once.:
while (($key,$value) = each %URLMappings) {
print "$key,$value\n";
}
I've confirmed that there is a value in URLMappings, by adding the line:
print "$URLMappings{'fred'}\n";
before the while loop.
Any ideas? I'm using Perl 5.005_02
------------------------------
Date: Wed, 7 Jun 2000 10:08:25 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: each not looping on a hash
Message-Id: <BOg%4.6$vR3.1612@vic.nntp.telstra.net>
Tintin <you.will.always.find.him.in.the.kitchen@parties> wrote in
message news:960337929.25694@shelley.paradise.net.nz...
> This one is driving me nuts.
>
> I have a simple hash that maps a URL path to a directory, ie:
>
> %URLMappings= (
> '~fred', '/home/fred/public_html',
> );
>
> In one of my subroutines, it does not even run through the while loop
once.:
>
> while (($key,$value) = each %URLMappings) {
> print "$key,$value\n";
> }
>
> I've confirmed that there is a value in URLMappings, by adding the
line:
>
> print "$URLMappings{'fred'}\n";
>
> before the while loop.
>
> Any ideas? I'm using Perl 5.005_02
>
from perldoc:
each HASH
When called in list context, returns a 2-element list
consisting of the key and value for the next element of
a hash, so that you can iterate over it. When called in
scalar context, returns the key for only the "next"
element in the hash. (Note: Keys may be `"0"' or `""',
which are logically false; you may wish to avoid
constructs like `while ($k = each %foo) {}' for this
reason.)
Maybe its not $URLMappings{fred} thats empty or zero and thus returning
false?
Wyzelli
------------------------------
Date: Tue, 06 Jun 2000 22:17:12 GMT
From: "SteveSingletary" <steve@gte.net>
Subject: Fill In With Spaces Command
Message-Id: <ILe%4.2335$ee7.158997@dfiatx1-snr1.gtei.net>
What is the best way to fill a field in with spaces. example - I fill in a
field with "Steve". When I write this field to my file I need the field to
be a fixed 25 spaces. Is there an easy way to write the Steve variable to
my file and fill in the remainder with spaces?
Thanks
Steve
------------------------------
Date: 6 Jun 2000 22:23:26 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: Fill In With Spaces Command
Message-Id: <8hjtku$43t$1@news.panix.com>
On Tue, 06 Jun 2000 22:17:12 GMT, SteveSingletary <steve@gte.net> wrote:
++ What is the best way to fill a field in with spaces. example - I fill in a
++ field with "Steve". When I write this field to my file I need the field to
++ be a fixed 25 spaces. Is there an easy way to write the Steve variable to
++ my file and fill in the remainder with spaces?
sprintf
Abigail
------------------------------
Date: Tue, 06 Jun 2000 15:59:23 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Fill In With Spaces Command
Message-Id: <393D824B.E4465111@My-Deja.com>
> What is the best way to fill a field in with spaces. example - I fill in a
> field with "Steve". When I write this field to my file I need the field to
> be a fixed 25 spaces. Is there an easy way to write the Steve variable to
> my file and fill in the remainder with spaces?
sprintf
and if you have many lots of variables to be written to a
file to create reports ..
perldoc perlform
-
------------------------------
Date: Tue, 06 Jun 2000 23:08:37 GMT
From: "SteveSingletary" <steve@gte.net>
Subject: Re: Fill In With Spaces Command
Message-Id: <Vvf%4.2530$ee7.170976@dfiatx1-snr1.gtei.net>
Thank You!
Steve
Makarand Kulkarni <makarand_kulkarni@My-Deja.com> wrote in message
news:393D824B.E4465111@My-Deja.com...
> > What is the best way to fill a field in with spaces. example - I fill
in a
> > field with "Steve". When I write this field to my file I need the field
to
> > be a fixed 25 spaces. Is there an easy way to write the Steve variable
to
> > my file and fill in the remainder with spaces?
>
> sprintf
>
> and if you have many lots of variables to be written to a
> file to create reports ..
>
> perldoc perlform
>
> -
>
>
>
------------------------------
Date: Tue, 6 Jun 2000 16:30:36 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Fill In With Spaces Command
Message-Id: <MPG.13a72972da51ff9298ab2e@nntp.hpl.hp.com>
In article <ILe%4.2335$ee7.158997@dfiatx1-snr1.gtei.net> on Tue, 06 Jun
2000 22:17:12 GMT, SteveSingletary <steve@gte.net> says...
> What is the best way to fill a field in with spaces. example - I fill in a
> field with "Steve". When I write this field to my file I need the field to
> be a fixed 25 spaces. Is there an easy way to write the Steve variable to
> my file and fill in the remainder with spaces?
This will write the entire string, even if it is too long:
printf OUT '%25s' => $string;
perldoc -f sprintf
This will truncate the string if it is too long:
print OUT pack A25 => $string;
perldoc -f pack
It can also be done with 'format' and 'write', but I've never found the
need.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 06 Jun 2000 23:46:41 GMT
From: "SteveSingletary" <steve@gte.net>
Subject: Re: Fill In With Spaces Command
Message-Id: <A3g%4.2669$ee7.180547@dfiatx1-snr1.gtei.net>
I would rather not use format for what I need to do. The code I'm using
below is not working. It looks like the print command is chopping off the
extra spaces that the sprintf gave it. It should write to the file
TEST*something *, but instead it is giving TEST*something*.
$SHIPTO = sprintf("%20s",$form_results{'BT_NAME'});
print FILE "TEST*$SHIPTO*\n";
Any ideas??
Steve
SteveSingletary <steve@gte.net> wrote in message
news:ILe%4.2335$ee7.158997@dfiatx1-snr1.gtei.net...
> What is the best way to fill a field in with spaces. example - I fill in
a
> field with "Steve". When I write this field to my file I need the field
to
> be a fixed 25 spaces. Is there an easy way to write the Steve variable to
> my file and fill in the remainder with spaces?
> Thanks
> Steve
>
>
------------------------------
Date: Tue, 06 Jun 2000 17:01:07 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Fill In With Spaces Command
Message-Id: <393D90C3.75A4CA05@My-Deja.com>
> It should write to the file TEST*something *, but instead it is giving
> TEST*something*.
It will not, as by default sprintf will pad with spaces on the left. If you want
right padding then use the left adjustment flag ( see man sprintf).
-
------------------------------
Date: Tue, 6 Jun 2000 17:12:48 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Fill In With Spaces Command
Message-Id: <MPG.13a7335a9f4e6cf498ab30@nntp.hpl.hp.com>
In article <A3g%4.2669$ee7.180547@dfiatx1-snr1.gtei.net> on Tue, 06 Jun
2000 23:46:41 GMT, SteveSingletary <steve@gte.net> says...
> I would rather not use format for what I need to do. The code I'm using
> below is not working. It looks like the print command is chopping off the
> extra spaces that the sprintf gave it. It should write to the file
> TEST*something *, but instead it is giving TEST*something*.
>
> $SHIPTO = sprintf("%20s",$form_results{'BT_NAME'});
> print FILE "TEST*$SHIPTO*\n";
>
> Any ideas??
The format should be '%-20s' (my previous response had that wrong). And
it worked just fine when I tried it with the string 'something' instead
of your hash access.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 07 Jun 2000 00:26:30 GMT
From: "SteveSingletary" <steve@gte.net>
Subject: Re: Fill In With Spaces Command
Message-Id: <WEg%4.2728$ee7.189702@dfiatx1-snr1.gtei.net>
okay - I feel stupid now - it has been working fine. I have been writing to
a file and then displaying the file out on my browser. This now brings up
another question. The file is fine - it has the spacing I need, but I still
need it displayed properly. Here is the code I use to display the file onto
the browser:
open (POFILE, "$podata");
@PODATA = <POFILE>;
close (PODATA);
foreach $poline (@PODATA) {
print "$poline<BR>\n";
This will print out everything perfect - except it removes the spaces that I
inserted!?!?
Any ideas??
Thanks again,
Steve
SteveSingletary <steve@gte.net> wrote in message
news:ILe%4.2335$ee7.158997@dfiatx1-snr1.gtei.net...
> What is the best way to fill a field in with spaces. example - I fill in
a
> field with "Steve". When I write this field to my file I need the field
to
> be a fixed 25 spaces. Is there an easy way to write the Steve variable to
> my file and fill in the remainder with spaces?
> Thanks
> Steve
>
>
------------------------------
Date: Tue, 06 Jun 2000 22:21:48 GMT
From: "Ben Kennedy" <bkennedy@hmsonline.com>
Subject: IO::Socket devices
Message-Id: <0Qe%4.236814$Tn4.2137712@news1.rdc2.pa.home.com>
is there a way to select which interface I use for an IO::Socket object
(/dev/eth0 vs /dev/ppp0 for example) or am I stuck with whatever the system
routes are based on the IP address? Thanks in advance -
--Ben Kennedy
------------------------------
Date: Wed, 7 Jun 2000 01:11:09 +0200
From: "Helza" <xxx@planet.nl>
Subject: Re: IP/port check help wanted
Message-Id: <8hk0ja$50n8t$1@reader3.wxs.nl>
Hi,
thanks for the reply,
i tryed using it but for some reason it always returns a 0 to me :(
i tryed multiple ip's but' none worked :(
and i also noticed that if you entered a ip which isn't xxx.xxx.xxx.xxx but
for example xx.xx.xx.xx it will not work :(
Any idea's if there is a error in this code?
<scarey_man@my-deja.com> wrote in message
news:8hj7n1$675$1@nnrp1.deja.com...
> Use Net::Ping from CPAN.
> I posted a similar question yesterday and was pointed to this and it
> worked OK.
> here is an extract.
> use Net::Ping;
> $host = "10.11.12.13" (what ever ip address you want)
> $p = Net::Ping->new();
> $retval = $p->ping($host,2);(2 = 2 second timeout if not pingable)
> $p->close();
>
> $retval will be 0 or 1 (0 = unsuccessful, 1 = successful)
>
> PERL Experts please do not post messages to pick holes in my code.
> It's not perfect and neither are we.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Tue, 06 Jun 2000 16:31:59 -0400
From: Eryq <eryq@zeegee.com>
Subject: MIME-tools 5.205 uploaded to CPAN
Message-Id: <j6f%4.91712$v7.3375799@news-west.usenetserver.com>
MIME-tools 5.205 has been uploaded to CPAN:
* New, resilient-and-fast parser is basically done.
MIME::Parser tries *real* hard to parse a message.
Brand-new MIME::Parser::Results object gives
you access to "what went wrong" after a parse
(if you care).
* Poorly-terminated multiparts are tolerated.
* Large binary attachments now parse very quickly.
If you are using MIME-tools 4.x and you want greater
speed and resiliency ASAP, this is probably a safe
time to upgrade. There will be a few more performance
enhancements coming soon, as well as automatic detection
and decoding of uuencoded parts.
Change log:
http://www.zeegee.com/code/perl/MIME-tools/docs/MIME/Tools.pm.html#CHANGE_LOG
For latest code and on-line docs:
http://www.zeegee.com/company/perl.html
Enjoy.
------------------------------
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 3270
**************************************