[15889] in Perl-Users-Digest
Perl-Users Digest, Issue: 3302 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 9 11:05:27 2000
Date: Fri, 9 Jun 2000 08:05:11 -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: <960563110-v9-i3302@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 9 Jun 2000 Volume: 9 Number: 3302
Today's topics:
ASP equivalent in non Microsoft environment <graham.wood@iona.com>
Re: ASP equivalent in non Microsoft environment <dburch@teleport.com>
Re: Capturing frames newbie@db-networks.com
Re: Chomp problem <tony_curtis32@yahoo.com>
Re: Chomp problem (-*-)
Compile my Perl scripts? <ctcato@aic-links.com>
DES on HPUX 10.20 psdsp@my-deja.com
Re: Dumb question.. How to prompt the user and get the <abe@ztreet.demon.nl>
Re: Encrypting / decrypting. <bkennedy99@home.com>
Re: Encrypting / decrypting. (Randal L. Schwartz)
Re: Error: Can't locate loadable object for module? - c <jeff@vpservices.com>
Re: Extract filename from path? <lr@hpl.hp.com>
Re: Help with a simple regular expression (Tad McClellan)
Re: Help with a simple regular expression <blah@nospam.com>
Re: Larry Rosler interview on perl.com! <dan@tuatha.sidhe.org>
Re: Larry Rosler interview on perl.com! <dan@tuatha.sidhe.org>
Re: modules for handling flat text databases <jbroz@transarc.com>
Re: No offense but Larry Wall should do the maths !! (Monte)
Re: perldoc & perlop man page? (Tad McClellan)
please help <helza@planet.nl>
Re: please help <tfm@sei.cmu.edu>
Problem with PlRPC installation from PPM <graham.wood@iona.com>
Re: Solution needed for 'simple' task. <ra_jones@my-deja.com>
Re: Solution needed for 'simple' task. <ra_jones@my-deja.com>
Re: Spaces (hymie!)
Splitting a Text String <roberty@idirect.com>
Splitting on a Special Reg <roberty@idirect.com>
Re: Strategy for processing a log file <red_orc@my-deja.com>
Re: Text Sorting Question <bmb@ginger.libs.uga.edu>
Re: Using multiple objects many times <dan@tuatha.sidhe.org>
Using perl's modules DBD:Mysql and DBI and mysql <Sebastien.THOMAS@none.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 9 Jun 2000 14:15:29 +0100
From: "Graham Wood" <graham.wood@iona.com>
Subject: ASP equivalent in non Microsoft environment
Message-Id: <8hqquk$spc$1@bvweb.iona.com>
Can anyone tell me whether you can use Active Server Pages in a
non-microsoft environment or whether anything similar exists for the Unix
world?
Thanks
Graham Wood
------------------------------
Date: Fri, 09 Jun 2000 06:44:58 -0700
From: Dan Burch <dburch@teleport.com>
Subject: Re: ASP equivalent in non Microsoft environment
Message-Id: <3940F4DA.344380C7@teleport.com>
Look at PHP3 at http://www.php.net/
Graham Wood wrote:
>
> Can anyone tell me whether you can use Active Server Pages in a
> non-microsoft environment or whether anything similar exists for the Unix
> world?
>
> Thanks
>
> Graham Wood
------------------------------
Date: Fri, 09 Jun 2000 14:19:22 GMT
From: newbie@db-networks.com
Subject: Re: Capturing frames
Message-Id: <4vu1ks4l52t9ese6bba5vtlq6upcccc7cb@4ax.com>
On 8 Jun 2000 23:58:34 GMT, ebohlman@netcom.com (Eric Bohlman) wrote:
|newbie@db-networks.com wrote:
|: I am capturing webpages with:
|:
|: use LWP::UserAgent;
|: $ua = new LWP::UserAgent;
|: $ua->timeout(45);
|: $request = new HTTP::Request('GET','http://www.website.com');
|: $response = $ua->request($request);
|: print INFO $response->{_content};
|:
|: This work for non-framed web pages. But I cannot capture frames. Is
|: there a way of doing it?
|
|For a framed page, that will give you the content of the frameset
|document. You'll have to parse that, using something like
|HTML::TokeParser, to get the URLs to the individual content pages and
|then retrieve each of them.
When I type the address and error web page stating that they only
support browsers with frames. There is nothing to parse. Is there an
updated librairy of LWP::UserAgent or another one?
Thanks
------------------------------
Date: 09 Jun 2000 08:31:23 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Chomp problem
Message-Id: <87ya4fkml0.fsf@limey.hpcc.uh.edu>
>> On Fri, 9 Jun 2000 12:42:21 +0100,
>> "Damian (-*-)" <damian@amorphous.co.uk> said:
> while ($fileline = <HIFILE>) {
^^^^^^^^^^^^^^^^^^^^^
-w and "use strict" would tell you there is a bug
waiting to happen here
> "chomp" may clash with future reserved word at
You're using perl4. Don't :-)
hth
t
--
"Trying is the first step towards failure"
Homer Simpson
------------------------------
Date: Fri, 9 Jun 2000 16:01:20 +0100
From: "Damian (-*-)" <damian@amorphous.co.uk>
Subject: Re: Chomp problem
Message-Id: <gI705.9243$0c7.50600@news2-hme0>
Tony,
From Clinton's reply I understand that our server has been installed with
the wrong version of Perl ! But upon
your recommendation I shall add in -w and "use strict" in future.
:)
Thanks,
Damian (-*-)
Tony Curtis <tony_curtis32@yahoo.com> wrote in message
news:87ya4fkml0.fsf@limey.hpcc.uh.edu...
| >> On Fri, 9 Jun 2000 12:42:21 +0100,
| >> "Damian (-*-)" <damian@amorphous.co.uk> said:
|
| > while ($fileline = <HIFILE>) {
| ^^^^^^^^^^^^^^^^^^^^^
| -w and "use strict" would tell you there is a bug
| waiting to happen here
|
| > "chomp" may clash with future reserved word at
|
| You're using perl4. Don't :-)
|
| hth
| t
| --
| "Trying is the first step towards failure"
| Homer Simpson
------------------------------
Date: Fri, 9 Jun 2000 09:10:46 -0400
From: "Casey Cato" <ctcato@aic-links.com>
Subject: Compile my Perl scripts?
Message-Id: <7_505.4434$Q7.175707@news-east.usenetserver.com>
I need help compiling my Perl scripts. I have about 8 different Perl
scripts that call each others various subroutines from a MAIN.PL script. I
have used the Require statement in the scripts. I have been reading about
the B module included in Perl to compile Perl scripts, but I am confused as
to how to compile all the various (eight) .PL files into some type of .exe.
The README file only seems to give instruction on compiling a single script
into an executable. I am a novice to Perl, so I could really use some help.
Thanks!
------------------------------
Date: Fri, 09 Jun 2000 14:40:10 GMT
From: psdsp@my-deja.com
Subject: DES on HPUX 10.20
Message-Id: <8hqvk6$57$1@nnrp1.deja.com>
Hi,
Is DES algo available in a Perl Module on HPUX 10.20?
As I understand from:
http://search.cpan.org/search?dist=Crypt-DES
The CPAN module Crypt-Des seems to have failed on all the
tested platforms.
If a module is not available, how can I use DES in a perl script?
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 09 Jun 2000 15:47:56 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Dumb question.. How to prompt the user and get the input.
Message-Id: <css1kso7dkv4hi8erjpm53i39hq85tha9b@4ax.com>
On Fri, 9 Jun 2000 12:29:21 +0200, "Matt King" <mattking@techie.com>
wrote:
>
> OK I got it. I used the $key = getc(TTY); from the docs and that does not
> work. However, changing that to $key = getc(); and it does work.
I am surprised. when I do:
perldoc -f getc
I get:
getc FILEHANDLE
getc Returns the next character from the input file attached to
FILEHANDLE, or the undefined value at end of file, or if
there was an error. If FILEHANDLE is omitted, reads from
STDIN. This is not particularly efficient. However, it
cannot be used by itself to fetch single characters without
waiting for the user to hit enter.
You did say (Thu, 8 Jun 2000 12:17:43 +0200):
> So how can I make a prompt for a single key press? Something like 'press any
> key to continue'.
> I didn't
> see that is not docs so.....
Correct :-)
--
Good luck,
Abe
------------------------------
Date: Fri, 09 Jun 2000 14:14:10 GMT
From: "Ben Kennedy" <bkennedy99@home.com>
Subject: Re: Encrypting / decrypting.
Message-Id: <SY605.243078$Tn4.2205545@news1.rdc2.pa.home.com>
> This is encoded with exactly four very simple
> lines of Perl 4 code, each line performing
> only one simple function. I'll give you a very
> generous twenty-four hours to crack this code
> with no more than four lines of Perl 4 code,
> each line performing one simple function. You
> are the big boy of Perl. Wouldn't be proper
> for a little girl of Perl to leave alligator
> teeth marks in your ego, right?
Without volunteers like Randal, etc, there would be no perl. People like
him spend a lot of time developing the language, writing modules, and
authoring books about it. What have you done for the Perl community, aside
from getting everyone pissed off at you? I think you should be a little
more respectful and thankful.
Ben Kennedy
------------------------------
Date: 09 Jun 2000 08:01:25 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Encrypting / decrypting.
Message-Id: <m1snum6gqi.fsf@halfdome.holdit.com>
>>>>> "Godzilla!" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
Godzilla!> This is encoded with exactly four very simple
Godzilla!> lines of Perl 4 code, each line performing
Godzilla!> only one simple function. I'll give you a very
Godzilla!> generous twenty-four hours to crack this code
Godzilla!> with no more than four lines of Perl 4 code,
Godzilla!> each line performing one simple function. You
Godzilla!> are the big boy of Perl. Wouldn't be proper
Godzilla!> for a little girl of Perl to leave alligator
Godzilla!> teeth marks in your ego, right?
1) I don't personally do de-crypto - it's not my area of expertise. I
leave that to experts, which I have on-call as needed.
2) You don't get 24 hours of my time for free. If you're willing to
discuss the purchase of the time (including the subcontracting
fees), please call my office below.
So I reject your challenge. Which does nothing to make my original
claim any less right (that you had a trivial encryption) since you've
done nothing to challenge *that* yet.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 09 Jun 2000 07:53:04 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Error: Can't locate loadable object for module? - csv_xs.pm (0/1)
Message-Id: <394104D0.FA9C9D83@vpservices.com>
"M. van den Bos" wrote:
>
> Can't locate loadable object for module Text::CSV_XS in @INC
> (@INC contains: /usr/lib/perl5/5.00503/i386-linux
> /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
> /usr/lib/perl5/site_perl/5.005 .) at DBD/CSV.pm line 47
>
> I haven't installed the module in perl.
Does that mean you just copied the files into the directories? That
will not work with any modules that have XS in the name. The XS
indicates that they include C or C++ code and need to be compiled in
order to work. Such modules *must* be installed with make or else you
need binary copies for your platform.
> This is because I have no root privileges on the system.
That makes no difference. Please read the FAQ on creating your own
library of modules. You can place the modules outside of
root-controlled directories, but you still need to install them.
> |cgi-bin|
> - Main.pl
> - |DBD|
> - File.pm
> - CSV.pm
> - |Text|
> - CSV_XS.pm
> - |SQL|
> - Statement.pm
> - Eval.pm
> - |Statement|
> - Statement.pm
That's all well and good, but as I mentioned, if you simply copied the
files there, it will not work.
--
Jeff
------------------------------
Date: Fri, 9 Jun 2000 07:28:42 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Extract filename from path?
Message-Id: <MPG.13aa9ef679c8310d98ab56@nntp.hpl.hp.com>
In article <393e10c7@si-nic.hrz.uni-siegen.de>, tjabo.kloppenburg@unix-
ag.org says...
> hi Henrik Jönsson,
>
> you wrote:
> > I am trying to create a function that extract the filename from a
> > path. (unix/win95)
>
> try this:
>
> #!/usr/bin/perl -w
Cheers for the '-w', but you lose credibility when you omit 'use
strict;', in these parts at any rate.
> $dpfad = $#ARGV > -1 ? $ARGV[$#ARGV] : 'c:\tmp\test/unix/fname.ext';
Somewhat smoother:
my $dpfad = @ARGV ? $ARGV[-1] : 'c:\tmp\test/unix/fname.ext';
> print "Testpath: " . $dpfad . "\n";
Either use commas or interpolate:
print "Testpath: $dpfad\n";
> print "Filename: " . ExtractFileName($dpfad) . "\n";
Use commas there.
> exit 0;
>
> sub ExtractFileName{
> my ($pfad) = @_;
> $pfad =~ s;\;/;g;; # change all \ to /
What that really does is change the first substring ';/' to a 'g', with
a null statement thrown in at the end for free. :-)
You probably meant this:
$pfad =~ s;\\;/;g; # change all \ to /
which is better writen this way:
$pfad =~ tr%\\%/%; # change all \ to /
which is faster. Using ';' as a regex delimiter is masochistic, as you
see.
> return substr($pfad,rindex($pfad,'/')+1);
> }
There are many other ways to do this, including a simple regex such as:
/([\\/]+)$/
And the module File::Basename, to include other oddities such as the
Mac.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 7 Jun 2000 17:34:15 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with a simple regular expression
Message-Id: <slrn8jtjf7.uu.tadmc@maxim.metronet.com>
On Wed, 7 Jun 2000 16:25:06 -0400, Dana H
<dana_hartley@nospam.hotmail.com> wrote:
>I'm not that experienced with PERL,
^^^^
We can tell :-)
"Perl" is used to refer to the language proper.
"perl" is used to refer to the implementation of the language,
(the interpreter).
"PERL" is not used.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 09 Jun 2000 16:42:44 +0200
From: Marco Natoni <blah@nospam.com>
Subject: Re: Help with a simple regular expression
Message-Id: <39410264.E806656C@nospam.com>
Tad,
Tad McClellan wrote:
> "Perl" is used to refer to the language proper.
> "perl" is used to refer to the implementation of the language,
> (the interpreter).
> "PERL" is not used.
Is that codified or just a current use? Many language or system names
being acronyms are referred in all uppercase (such as MVS, sometimes
FORTRAN...).
Of course, with many keyboards writing Perl is more lazy than writing
PERL, so is also more relating to its philosophy... ;)
Best regards,
Marco
------------------------------
Date: Fri, 09 Jun 2000 13:31:16 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <Ek605.107069$hT2.427521@news1.rdc1.ct.home.com>
Reini Urban <rurban@x-ray.at> wrote:
> Larry Rosler wrote:
>>Standardization may be 'de jure' or 'de facto'. Because of its
>>monopolistic clout, anything Microsoft promulgates by itself is de facto
>>standardized. They tried to subsume and subvert the de facto
>>standardization of Java to their own purposes, but have failed so far.
>>And I have been told that Visual C++ is a travesty of the C++ Standard.
>>
>>Perl is in fact already de facto standardized (because of the single
>>official source), but the definition is vague and there is no corporate
>>clout to support it. That is why I believe a more formal, de jure
>>activity is required.
>>
>>But the Open Source movemet may be creating a new paradigm for
>>standardization. We shall see!
> As long there is only one official source there's no need for any
> standardization.
That's a common misconception, and one that's not true. One of the points
of standards is to give multiple implementations something to meet. You'd
think we didn't need that, but we do because there *are* multiple
implementations. Each major version of perl could be reasonably described
as an independent implementation. How can we know that a version is
beahving as it ought to without having a standard of some sort to work
against? Saying "The reference implementation is always right" doesn't cut
it, because it means we could make s/// behave completely differently in
perl 5.8.0 and still be right.
A standard also gives the *programmer* something to work with. Without a
standard you have no guarantees of how a language is supposed to work, so
how can you make sure your program does what you think it should?
Experimentation just doesn't cut it with computers.
Dan
------------------------------
Date: Fri, 09 Jun 2000 13:34:40 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <Qn605.107081$hT2.427521@news1.rdc1.ct.home.com>
Larry Rosler <lr@hpl.hp.com> wrote:
> In article <MSY%4.106864$hT2.426465@news1.rdc1.ct.home.com>,
> dan@tuatha.sidhe.org says...
>> Larry Rosler <lr@hpl.hp.com> wrote:
>>
>> > Perl is defined by a single official open source. It is a deterministic
>> > computer program. The most arcane DWIMmery is deterministic, hence
>> > definable. Without looking, I'll bet there isn't a single call to
>> > rand(3C) anywhere in the perl source.
>>
>> And you'd probably be wrong. (Depending on what Configure found, of
>> course) How else do you think the rand operator generates its data? :)
> I meant called by the compiler, of course, not made available as a pass-
> through from user Perl code. But I think you knew what I meant. :-)
Ah, ya caught me. :) Can't think of a good place to stick in a use of
rand, alas. Maybe in the memory allocation code...
Dan
------------------------------
Date: Fri, 09 Jun 2000 14:25:15 +0100
From: "Joe_Broz@transarc.com" <jbroz@transarc.com>
Subject: Re: modules for handling flat text databases
Message-Id: <3940F03B.A6177FA8@transarc.com>
David Wall wrote:
>
> I've been using small (<50KB, often <10KB) flat text databases for various
> things at work, and *finally* realized that someone has probably already
> written a module to handle this sort of repetitive task. So I checked CPAN
Check out DBD::CSV (which includes DBD::File) and DBD::RAM on CPAN. I'm not
familiar with the other ones you mentioned.
Here's the DBI homepage
http://www.symbolstone.org/technology/perl/DBI/
Questions about these modules are better directed to
comp.lang.perl.modules. There's also a dbi-users mailing list.
------------------------------
Date: Fri, 09 Jun 2000 12:42:09 GMT
From: montep@about.com (Monte)
Subject: Re: No offense but Larry Wall should do the maths !!
Message-Id: <3940e3ab.16647575@news.hal-pc.org>
On Thu, 08 Jun 2000 18:03:13 -0700, Jon Ericson
<Jonathan.L.Ericson@jpl.nasa.gov> wrote:
>TheEx0rcist wrote:
>> Why isn't "print int(rand*3)" the same as "print int(3*rand)" ??? Isn't
>> multiplication supposed to be _always_ commutative?
>Actually this is an anomoly of the perl parser. Observe:
> $ perl -e 'print *3'
> *main::3
> $ perl -e 'print 1*3'
> 3
>In Perl, * can be the multiplication operator or the typeglob type
>prefix (see perldata). Perl parses your first example as:
> print(int(rand(*3)))
>and your second example as:
> print(int(3*rand()))
>Perl trys to DWIM (Do What I Mean), but sometimes it guesses wrong.
>Jon
Your post is highly illustrative of a common thing in this NG (and
others). A total so far of 15 posts, including those of some 'gods'
and yet yours is the only one that addressed the original question
posed AND provided the correct answer. People are indeed funny. The
original poster was absolutely mathematically correct in his
understanding of multiplication and the commutative properties, it was
the syntactics of the restricted domain of Perl that was the basis of
confusion.
Which leads to another rather sweeping observational generality: A
large percentage of computer programmers and gurus are sorely lacking
in fundamental knowledge. A close corollary is the use of english
majors to write tech manuals, they do not understand what an engineer
is talking about, they hear words, not meaning and thus in their
efforts to be grammatically correct will say something entirely
different and which usually is entirely wrong.
Oh well it has its upside, without the screwer-uppers their would be
far fewer jobs for the fixer-uppers.<grin>
------------------------------
Date: Wed, 7 Jun 2000 17:47:55 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: perldoc & perlop man page?
Message-Id: <slrn8jtk8r.uu.tadmc@maxim.metronet.com>
On Wed, 7 Jun 2000 23:39:20 +0200, Helza <helza@planet.nl> wrote:
>I have the problem that i'm still learing to write perl, and directly
>started out with a pretty difficult project for myself.
Sounds to me like you are trying to learn *three* different
things at the same time.
Usenet
see news.announce.newusers
CGI
off-topic in this newsgroup, ask CGI questions in the CGI newsgroup:
comp.infosystems.www.authoring.cgi
"perldoc -q CGI" finds about half a dozen FAQs, including:
"Where can I learn about CGI or Web programming in Perl?"
"How can I get better error messages from a CGI program?"
"My CGI script runs from the command line but not the browser.
(500 Server Error)"
"How do I decode a CGI form?"
Perl
ask Perl questions here, but only after checking the
standard docs (as required by netiquette).
>Is there a sort of webpage where i can find the information like perldoc?
www.perl.com, click where it says "Documentation".
>and i have to write upload en run every piece of code i make it takes up
>alot of time and never really get errors except error 500 :(
>what would be the easiest way for me (on my win98) to install/use perl like
>i would on my website but with the debug information?
Install Perl on your local computer.
Install a free web server on your local computer (e.g. www.apache.org).
Then run CGI programs right at home.
You can loop through the write, execute, curse, debug cycle
quickly then.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 9 Jun 2000 15:12:04 +0200
From: "Helza" <helza@planet.nl>
Subject: please help
Message-Id: <8hqqkd$6045g$1@reader4.wxs.nl>
I've asked it already before but most answers I get don't work for some
reason :( and i'm 100% stuck until i fix this problem :(
I simply want to ping a ip to see if it responds, if not that it will
continue with the rest of the program.
I've tryed:
--------------------------------------------------
$host = "130.89.225.137";
$port = 64120;
$iaddr = inet_aton("0.0.0.0");
$proto = getprotobyname('udp');
$paddr = sockaddr_in(3568, $iaddr);
socket(SOCKET, PF_INET, SOCK_DGRAM, $proto) || die "socket: $!";
bind(SOCKET, $paddr) || die "bind: $!";
$| = 1;
$hisiaddr = inet_aton($host) || die "unknown host";
$hispaddr = sockaddr_in($port, $hisiaddr);
defined(send(SOCKET, $request, 0, $hispaddr)) || die "send $host: $!";
$rin = 0;
vec($rin, fileno(SOCKET), 1) = 1;
if( select($rout = $rin, undef, undef, 2) == 0 ) {
print "Content-type: text/html\n\n<font class=R>Server is down</font>\n";
exit;
}
--------------------------------------------------
last if will never become 0 if it doesn't receive a reply, so it will always
continue with the program which will then
quit with an error because it doesn't receive info from server then.
and i tryed:
----------------------------------------------------
$host = "130.89.225.137";
$timeout = 5;
$online = 0;
if ( qx(/usr/sbin/ping $host $timeout) =~ /alive/ ) {
$online = 1;
}
but this will always output 0
so it doesn't get the ping ;(
I really need to get this problem fixed :( i can't continue else. So please
if you know how i can fix this respond.
------------------------------
Date: Fri, 09 Jun 2000 10:34:12 -0400
From: Ted Marz <tfm@sei.cmu.edu>
Subject: Re: please help
Message-Id: <39410064.6D453B1B@sei.cmu.edu>
I'm not quite catching why your select() call isn't working. It seems
well formed.
I suspect that you are always getting a 0 return from your system(ping)
call because you are getting the success status of the system, not the
status of the ping.
To try and get around this, use the Net::Ping
This won't tell you if a server is up on any particular port, but it
should tell you if the host is reachable.
Ted
Helza wrote:
>
> I've asked it already before but most answers I get don't work for some
> reason :( and i'm 100% stuck until i fix this problem :(
>
> I simply want to ping a ip to see if it responds, if not that it will
> continue with the rest of the program.
>
------------------------------
Date: Fri, 9 Jun 2000 14:14:12 +0100
From: "Graham Wood" <graham.wood@iona.com>
Subject: Problem with PlRPC installation from PPM
Message-Id: <8hqqs6$so2$1@bvweb.iona.com>
I'm trying to set up a web client to connect to an Access database. I've
got as far as setting up the DBI and DBD::ODBC modules and PPM tells me that
DBI::Proxy is installed.
I'm looking for the other modules that DBI::Proxy requires before it will
work. The Programming the Perl DBI book mentions that you need PlRPC and
Net::Daemon.
I tried PPM install PlRPC and a few other things based on information in the
book but they all came back with a message saying that a PPD couldn't be
found for the module.
Can anyone tell me definitively:
1. What modules I need on Unix web server side and NT database server side
2. What command I need to use in PPM to get the NT ones and with perl -MCPAN
to get the Unix end?
Thanks in advance
Graham Wood
------------------------------
Date: Fri, 09 Jun 2000 12:59:03 GMT
From: ra jones <ra_jones@my-deja.com>
Subject: Re: Solution needed for 'simple' task.
Message-Id: <8hqpmd$r97$1@nnrp1.deja.com>
In article <8hqh6s$r8e$1@clematis.singnet.com.sg>,
"Swee Heng" <sweeheng@usa.net> wrote:
> > This works perfectly for the example you gave. Unfortunately in
trying
> > to simplify the details of the task I think I must have misled you
> > regards the terms.
> No, I was not misled.
>
> > The contents of the list are actually words, not
> > letters, and so the code doesn't work - it returns the terms with
> > incremented last-letters.
> Oh really??? It didn't work???
>
> > Can you suggest an appropriate modification?
> None required. Try this with the *same* pretty() function:
>
> sub pretty { ($c = pop @_, @_)[1] ? (join (', ', @_) . " and $c") : $c
}
> @annoyed_words = qw(DID YOU EVEN TRY THE CODE ??? !!!);
> print pretty (@annoyed_words);
>
>
Swee,
Yes of course I tried it. The code you provided did what I said when
inserted into my script. The code above also works (thanks), providing I
omit the second line (beginning: for ($c = 'A'; etc) and substitute my
array for yours. For the experienced observer this may or may not have
been obvious from your previous post, but the reason I asked for help
originally was becasue I didn't know how to do it. Still grateful for
your assistance though.
--
ra jones (posted via deja.com)
address for e-mail reply:
rajones(at)mail(dot)com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 09 Jun 2000 13:00:21 GMT
From: ra jones <ra_jones@my-deja.com>
Subject: Re: Solution needed for 'simple' task.
Message-Id: <8hqpor$rb5$1@nnrp1.deja.com>
In article <8hqh6s$r8e$1@clematis.singnet.com.sg>,
"Swee Heng" <sweeheng@usa.net> wrote:
> > This works perfectly for the example you gave. Unfortunately in
trying
> > to simplify the details of the task I think I must have misled you
> > regards the terms.
> No, I was not misled.
>
> > The contents of the list are actually words, not
> > letters, and so the code doesn't work - it returns the terms with
> > incremented last-letters.
> Oh really??? It didn't work???
>
> > Can you suggest an appropriate modification?
> None required. Try this with the *same* pretty() function:
>
> sub pretty { ($c = pop @_, @_)[1] ? (join (', ', @_) . " and $c") : $c
}
> @annoyed_words = qw(DID YOU EVEN TRY THE CODE ??? !!!);
> print pretty (@annoyed_words);
>
>
Swee,
Yes of course I tried it. The code you provided did what I said when
inserted into my script. The code above also works (thanks), providing I
omit the second line (beginning: for ($c = 'A'; etc) and substitute my
array for yours. For the experienced observer this may or may not have
been obvious from your previous post, but the reason I asked for help
originally was becasue I didn't know how to do it. Still grateful for
your assistance though.
--
ra jones (posted via deja.com)
address for e-mail reply:
rajones(at)mail(dot)com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 9 Jun 2000 15:09:35 GMT
From: hymie@lactose.smart.net (hymie!)
Subject: Re: Spaces
Message-Id: <8hr1bf$mna$1@news.smart.net>
In our last episode, the evil Dr. Lacto had captured our hero,
"Tintin" <you.will.always.find.him.in.the.kitchen@parties>, who said:
>
>"Mike Solomon" <mike.solomon@eps.ltd.uk> wrote in message
>news:8hoh2v$5fi$1@news6.svr.pol.co.uk...
>> please ignore my earlier reply
>>
>> it should read :
>>
>> $foo =~ s/ file://g;
>>
>> Outlook was playing formatting games !
>
>It still is.
This appears to be a news*reader* error, not a news*poster* error.
Both of the original articles look correct to me:
>>>it should read :
>>>
>>> $foo =~ s/ //g;
>>>
>>> Outlook was playing formatting games !
hymie! http://www.smart.net/~hymowitz hymie@lactose.smart.net
===============================================================================
I'm getting to the point where I don't feel the pain, and I've had enough.
I'm ready for the next time it hits me again 'cause I've gotten tough.
--Billy Joel
===============================================================================
------------------------------
Date: Fri, 09 Jun 2000 14:47:02 GMT
From: "Robert Young" <roberty@idirect.com>
Subject: Splitting a Text String
Message-Id: <Gr705.294056$Kv2.619944@quark.idirect.com>
Can anyone give me a regular expression to perform a split where the
expression is split on a character unless the character is preceded by a
backslash (\) ?
------------------------------
Date: Fri, 09 Jun 2000 14:55:12 GMT
From: "Robert Young" <roberty@idirect.com>
Subject: Splitting on a Special Reg
Message-Id: <kz705.294065$Kv2.619639@quark.idirect.com>
Can anyone give me a regular expression to perform a split where the
expression is split on a character unless the character is preceded by a
backslash (\) ?
------------------------------
Date: Fri, 09 Jun 2000 13:34:37 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: Strategy for processing a log file
Message-Id: <8hqrpd$spo$1@nnrp1.deja.com>
In article <3940e9f0$1@news.telinco.net>,
"Brendan Newport" <brendan@cathouse.nwnet.co.uk> wrote:
> I'm in the process of evaluating a method for processing a log file
> from a provisioning process.
>
> The log file contains a huge degree of spurious data. However I'd
> like to extract individual lines and print them to a file.
>
> The data I'm after always appears numerous times in an uninterrupted
> section, separated by the spurious data.
some sample data might help . . .;^)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 9 Jun 2000 10:32:29 -0400
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: Text Sorting Question
Message-Id: <Pine.A41.4.21.0006091031390.4330-100000@ginger.libs.uga.edu>
On Thu, 8 Jun 2000, Uri Guttman wrote:
> >>>>> "JZ" == Jeff Zucker <jeff@vpservices.com> writes:
>
> JZ> Lauren Smith wrote:
> >>
> >> Tom Briles <sariq@texas.net> wrote in message
> >> news:393FB455.9A05153@texas.net...
> >> > GaRroTe. ;)
>
> >> I hate to admit this, but it looks to me to be 'Guttman-Rosler
> >> Transform, as in GutRoT'.
> >> *duck*
>
> JZ> My secret decoder ring tells me the proper capitalization is:
> JZ> GUttman-RosLer transform
>
> JZ> So the whole thing is obviously just a troll from our favorite GURL.
> JZ> *ducking very very low*
>
> I am sentencing you all to be locked in a closet with moronzilla for a
> period of no less than 3 days.
>
> Judge Thomas Penfield Jackson
I'd settle.
--
Brad
------------------------------
Date: Fri, 09 Jun 2000 13:41:11 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Using multiple objects many times
Message-Id: <Xt605.107100$hT2.427521@news1.rdc1.ct.home.com>
|Odo| <jasonb885@my-deja.com> wrote:
[Major snippage]
> Then, I do something similar in each of the above objects. For example:
> package EdcomLib::Tables;
> use strict;
> use EdcomLib::SQL;
> use EdcomLib::Cache;
> use EdcomLib::Time;
> sub new {
> my $proto = shift;
> my $class = ref($proto) || $proto;
> my $self = {};
> $self->{CACHE} = new EdcomLib::Cache;
> $self->{SQL} = new EdcomLib::SQL;
> $self->{TIME} = new EdcomLib::Time;
> bless ($self,$class);
> return $self;
> }
> Now is the part that confuses me. After merely 'using' those four
> modules above in my script and then calling them with 'new' I have an
> additional 800K of overhead.
Well the obvious thing I can think of is that the new method for one of
your three modules chews down a lot of memory. One trick you can use to
see what's going on is to insert this line:
system("ps -lp $$");
in your code before and after every statement that you think might suck
down a lot of memory. (Assuming a SysV ps, at least)
My bet would be that you're getting bitten by the SQL module, since
database connections traditionally suck down great gobs of memory, but its
always possible there's a whoops somewhere else, too.
Dan
------------------------------
Date: Fri, 09 Jun 2000 16:36:53 +0200
From: Sebastien THOMAS <Sebastien.THOMAS@none.net>
Subject: Using perl's modules DBD:Mysql and DBI and mysql
Message-Id: <39410104.13AEEA14@none.net>
Hi all,
I'm trying to do an "insert" to my mysql database from a perl program.
I've installed the DBI module for perl, as so the DBD:mysql-msql driver.
It seems (tell me if I'm wrong) that I can use any of this 2 modules :
$dbh_mysql=DBI->connect("news\@localhost","$user",$password, "mysql");
(or
$dbh_mysql=DBI->connect("dbi:mysql:news\@localhost","$user",$password);)
or
$dbh_mysql=Mysql->Connect($host,$database,$user,$password)
It seems that both should work.
First problem is that only the Mysql seems to be able to connect. What
is wrong in the syntax ???
Second problem is that It seems not to be possible to de an "insert"
using the mysql driver :((((( (still hoping I'm wrong again :)
I should be able to do a :
$sth = $dbh_mysql->prepare("select * from $table where group_name like
'freesbee.%'");
$result=$dbh_mysql->execute;
but, in fact, I can only use this if I connect with the DBI module, not
the Mysql one.
Third problem is that nobody seems to do insert to an mysql databas from
a perl script (prefering php), so I can't find out any running prog that
could help me...
Thanks for your forthcoming help :)
--
_______________________________________________
Sebastien THOMAS none networks
System Engineer freesbee
geo:153, rue Saint-Denis, 75002 Paris, France
vox:+33 1 45 08 23 10 - fax:+33 1 45 08 25 29
mailto:sebastien.thomas@none.net
------------------------------
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 3302
**************************************