[21779] in Perl-Users-Digest
Perl-Users Digest, Issue: 3983 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 16 18:15:40 2002
Date: Wed, 16 Oct 2002 15:10:18 -0700 (PDT)
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, 16 Oct 2002 Volume: 10 Number: 3983
Today's topics:
Perl and MySql <jarkko.rantamaki@edu.stadia.no.spam.fi>
Re: Perl and MySql <bryan@akanta.com>
Re: Perl and MySql <asimmons@mitre.org>
Re: Perl and MySql <cpryce@pryce.net>
Re: Perl script works half the time <yo@rap.com>
Re: Problems after update 5.0 -> 5.8 <100.17706@germanynet.de>
Re: Problems with perl.org/perlmongers.org websites and <comdog@panix.com>
Re: ref() on hash keys <uri@stemsystems.com>
Re: ref() on hash keys <usenet@tinita.de>
Re: ref() on hash keys <alecler@sympatico.ca>
Re: ref() on hash keys <uri@stemsystems.com>
Re: ref() on hash keys <alecler@sympatico.ca>
Re: Sleeping until another process finishes? <skuo@mtwhitney.nsc.com>
Win 32 IP Ping <mail@eircom.net>
Re: Win32::NetAdmin <asimmons@mitre.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 16 Oct 2002 22:08:01 +0300
From: "JorkkiS" <jarkko.rantamaki@edu.stadia.no.spam.fi>
Subject: Perl and MySql
Message-Id: <aokd4q$viu$1@nyytiset.pp.htv.fi>
Hello!
I have to do a small Sql database project and I was wondering...
I was thinking would Perl be an easy way to do some web interfaces for this
database. I have some experience in Perl/CGI programming, but I haven't
found any good tutorials for Perl and Sql database programming.
I have found many sites about PHP / Sql, so should I look into PHP instead
of Perl. I'd like to do this in Perl since I have some experience in it,
but do you think it would be easier or make more sense, if it was done with
PHP?
I'd greatly appreciate if someone could guide me to the right direction or
recommend me a good Perl/Sql book or web tutorial?
Cheers
-Jarkko
------------------------------
Date: Wed, 16 Oct 2002 19:42:36 GMT
From: Bryan <bryan@akanta.com>
Subject: Re: Perl and MySql
Message-Id: <3DADC12B.4020700@akanta.com>
JorkkiS wrote:
> Hello!
>
> I have to do a small Sql database project and I was wondering...
>
> I was thinking would Perl be an easy way to do some web interfaces for this
> database. I have some experience in Perl/CGI programming, but I haven't
> found any good tutorials for Perl and Sql database programming.
>
> I have found many sites about PHP / Sql, so should I look into PHP instead
> of Perl. I'd like to do this in Perl since I have some experience in it,
> but do you think it would be easier or make more sense, if it was done with
> PHP?
>
> I'd greatly appreciate if someone could guide me to the right direction or
> recommend me a good Perl/Sql book or web tutorial?
>
> Cheers
> -Jarkko
>
I use perl and mysql all the time. I like the Data::Table module which
you can get from CPAN. It allows you query a database and dumps the
results in to an object that you can manipulate in lots of ways-
including dumping to html, tsv or csv. Never played with php much
though, I can't get used to mixing my html and php code :P
hth,
B
------------------------------
Date: Wed, 16 Oct 2002 15:44:56 -0400
From: "Aaron Simmons" <asimmons@mitre.org>
Subject: Re: Perl and MySql
Message-Id: <aokfin$1c4$1@newslocal.mitre.org>
Definitely stick with Perl. DBI will be the Perl module you use for
database connectivity.
Check out this short web tutorial (section 4 has a full guestbook example):
http://www.linuxplanet.com/linuxplanet/tutorials/1046/1/
--
Aaron Simmons
G066-Software Systems Eng, Lead
(703) 883-3394
AaronSimm1 (AIM)
"JorkkiS" <jarkko.rantamaki@edu.stadia.no.spam.fi> wrote in message
news:aokd4q$viu$1@nyytiset.pp.htv.fi...
> Hello!
>
> I have to do a small Sql database project and I was wondering...
>
> I was thinking would Perl be an easy way to do some web interfaces for
this
> database. I have some experience in Perl/CGI programming, but I haven't
> found any good tutorials for Perl and Sql database programming.
>
> I have found many sites about PHP / Sql, so should I look into PHP instead
> of Perl. I'd like to do this in Perl since I have some experience in it,
> but do you think it would be easier or make more sense, if it was done
with
> PHP?
>
> I'd greatly appreciate if someone could guide me to the right direction or
> recommend me a good Perl/Sql book or web tutorial?
>
> Cheers
> -Jarkko
>
>
>
>
------------------------------
Date: Wed, 16 Oct 2002 15:42:38 -0500
From: cp <cpryce@pryce.net>
Subject: Re: Perl and MySql
Message-Id: <B9D3396E.103EA%cpryce@pryce.net>
in article aokd4q$viu$1@nyytiset.pp.htv.fi, JorkkiS at
jarkko.rantamaki@edu.stadia.no.spam.fi wrote on 10/16/02 2:08 PM:
> Hello!
>
> I have to do a small Sql database project and I was wondering...
>
> I was thinking would Perl be an easy way to do some web interfaces for this
> database. I have some experience in Perl/CGI programming, but I haven't
> found any good tutorials for Perl and Sql database programming.
>
> I have found many sites about PHP / Sql, so should I look into PHP instead
> of Perl. I'd like to do this in Perl since I have some experience in it,
> but do you think it would be easier or make more sense, if it was done with
> PHP?
>
> I'd greatly appreciate if someone could guide me to the right direction or
> recommend me a good Perl/Sql book or web tutorial?
>
[f'ups set]
Please don't multi-post. If you want to ask a question in more than one news
group, specify them both in the to: field (called cross-posting).
------------------------------
Date: Wed, 16 Oct 2002 14:55:40 -0400
From: some guy <yo@rap.com>
Subject: Re: Perl script works half the time
Message-Id: <3dadb5cf$1_1@nopics.sjc>
On Sun, 13 Oct 2002 19:59:16 -0400, some guy wrote:
> Hi,
>
> I wrote a script for my website on tripod.com and half the time it
> works, but half the time it doesn't seem to like one of my regular
> expressions and generates the following error msg
>
> regexp reset interpolation flag trapped by operation mask at grades.cgi
> line 25
>
>
> The regular expression that it doesn't like looks like the following
>
> $entry =~ /[ \w]+\:\:$thePassword\:\:/i
>
> Thanks for any help you can give. I am beginning to conclude that
> tripod.com has got a broken perl implementation. But I have learned to
> believe never blame it on the implementation.
I cantacted tripod and they acknowledged that it was a malfunction on
their servers and they are working on a fix. They have listed the problem
on their alerts page. So for the first time in my programing life, it was
not a bug in my program, but in fact the installation was broken hahah.
------------------------------
Date: Wed, 16 Oct 2002 23:00:50 +0200
From: Rick Denoire <100.17706@germanynet.de>
Subject: Re: Problems after update 5.0 -> 5.8
Message-Id: <3vgrqugt9bimt1u6d10krh236tlompl4r3@4ax.com>
"Tulan W. Hu" <twhu@lucent.com> wrote:
>> How do I find out ALL installed perl modules in the system?
>$ perldoc /...../perl/lib/5.6.0/architecture_name/perllocal.pod
>
>I would redownload all the newer version of modules and rebuild them for
>5.8.
Yes but how is the trick to avoid rendering the old perl version (5.0)
unusuable while rebuilding the new modules...
Bye
Rick
------------------------------
Date: Wed, 16 Oct 2002 14:06:25 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Problems with perl.org/perlmongers.org websites and email addresses
Message-Id: <161020021406252284%comdog@panix.com>
In article <7vnqqukp3k9vu8hoi8nrljh1kpbadp48o9@4ax.com>, Bart Lateur <bart.lateur@pandora.be> wrote:
> The website <http://lists.perl.org> is offline, gining me a 500 "could
> not connect to server" error. I tried to warn the webmaster via
> <lists@perlmongers.org> but my SMTP server refuses to send mail to that
> address:
why are you using that domain?
> 450 <lists@perlmongers.org>: Recipient address rejected: Domain
> not found.
> I also noticed that <http://www.perlmongers.org> and
> <http://perlmongers.org> give me a DNS error.
why are you trying to connect to those domains? there isn't anything there
and there never has been.
> I'm posting this here hoping somebody who can do something about it will
> pick it up
i think Elaine Ashton was the one taking care of lists.perl.org.
.
--
brian d foy <comdog@panix.com> - Perl services for hire
The Perl Review - a new magazine devoted to Perl
<http://www.theperlreview.com>
------------------------------
Date: Wed, 16 Oct 2002 18:19:26 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: ref() on hash keys
Message-Id: <x7wuoi8cwi.fsf@mail.sysarch.com>
>>>>> "A" == Andre <alecler@sympatico.ca> writes:
A> Hiyall, I found this unexpected behavior when attempting to test whether
A> the keys of a hash are references (5.6.1):
A> my %h = ('foo', 'bar', [0,1], 0);
A> for (keys %h) {
A> print "$_ : ", ref(), "\n";
A> }
A> I would have expected the second line to read,
A> ARRAY(0x6649010) : ARRAY
A> my %h = ('foo', 'bar', 0, [0,1]);
A> for (values %h) {
A> print "$_ : ", ref(), "\n";
A> }
A> ARRAY(0x6649010) : ARRAY
hash keys are always strings. you can't use a ref for a key and get the
ref out. you just get the stringified form of the ref.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 16 Oct 2002 18:34:00 GMT
From: Tina Mueller <usenet@tinita.de>
Subject: Re: ref() on hash keys
Message-Id: <aokbeo$n9tdj$2@fu-berlin.de>
Andre <alecler@sympatico.ca> wrote:
> Hiyall, I found this unexpected behavior when attempting to test whether
> the keys of a hash are references (5.6.1):
> #!perl -w
> use strict;
> my %h = ('foo', 'bar', [0,1], 0);
> for (keys %h) {
> print "$_ : ", ref(), "\n";
> }
add this:
use Data::Dumper;
print Dumper \%h;
then you will see, that there are no keys which are hashes.
a key of a hash is always a string, and a value always
a scalar/ref.
if you try to insert [0,1] for example, it
gets stringified. a stringified array-ref/anonymous
array is something like "ARRAY(0x6649010)";
you can never turn it back into an array.
how would you try to get the value for [0,1], anyway?
this seems to be useless.
for further information, have a look into
perldoc perldata
perldoc perldsc
hth, tina
--
http://www.tinita.de/ \ enter__| |__the___ _ _ ___
http://Movies.tinita.de/ \ / _` / _ \/ _ \ '_(_-< of
http://PerlQuotes.tinita.de/ \ \ _,_\ __/\ __/_| /__/ perception
------------------------------
Date: Wed, 16 Oct 2002 14:40:44 -0400
From: Andre <alecler@sympatico.ca>
Subject: Re: ref() on hash keys
Message-Id: <alecler-47D0CC.14404416102002@news1.qc.sympatico.ca>
In article <x7wuoi8cwi.fsf@mail.sysarch.com>, Uri Guttman
<uri@stemsystems.com> wrote:
> >>>>> "A" == Andre <alecler@sympatico.ca> writes:
>
> A> Hiyall, I found this unexpected behavior when attempting to test
> whether
> A> the keys of a hash are references (5.6.1):
>
[...]
> hash keys are always strings. you can't use a ref for a key and get the
> ref out. you just get the stringified form of the ref.
You're full of crap, Frank!
Andre
P.S. You know what I mean. ;)
------------------------------
Date: Wed, 16 Oct 2002 18:51:41 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: ref() on hash keys
Message-Id: <x7lm4y8ber.fsf@mail.sysarch.com>
>>>>> "A" == Andre <alecler@sympatico.ca> writes:
A> In article <x7wuoi8cwi.fsf@mail.sysarch.com>, Uri Guttman
A> <uri@stemsystems.com> wrote:
>> hash keys are always strings. you can't use a ref for a key and get the
>> ref out. you just get the stringified form of the ref.
A> You're full of crap, Frank!
A> Andre
A> P.S. You know what I mean. ;)
please don't invoke the beast. we have had a couple of weeks of peace
and i would like to extend that as long as possible.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Wed, 16 Oct 2002 14:56:30 -0400
From: Andre <alecler@sympatico.ca>
Subject: Re: ref() on hash keys
Message-Id: <alecler-B0B48B.14563016102002@news1.qc.sympatico.ca>
In article <aokbeo$n9tdj$2@fu-berlin.de>, Tina Mueller <usenet@tinita.de>
wrote:
> how would you try to get the value for [0,1], anyway?
> this seems to be useless.
Absolutely. I just seem to be braindead today. Thanks.
Andre
------------------------------
Date: Wed, 16 Oct 2002 11:12:47 -0700
From: Steven Kuo <skuo@mtwhitney.nsc.com>
Subject: Re: Sleeping until another process finishes?
Message-Id: <Pine.GSO.4.21.0210161112150.8812-100000@mtwhitney.nsc.com>
On 16 Oct 2002, D. Alvarado wrote:
> I know the $pid of another process, and I want my perl script to sleep
> until the other process (denoted by $pid) is done. Any ideas?
>
> Thanks, Dave
>
perldoc -f kill
--
HTH,
Steven
------------------------------
Date: Wed, 16 Oct 2002 21:23:34 -0700
From: "NewsGroups" <mail@eircom.net>
Subject: Win 32 IP Ping
Message-Id: <aokedh$755$1@dorito.esatclear.ie>
can someone tell me where to get a perl script that will ping 24 windows
computers from a windows server and report back ?
------------------------------
Date: Wed, 16 Oct 2002 16:27:30 -0400
From: "Aaron Simmons" <asimmons@mitre.org>
Subject: Re: Win32::NetAdmin
Message-Id: <aoki2g$1hf$1@newslocal.mitre.org>
I'm not sure if this is your only problem, but I believe $Machine will have
a newline at the end of it every time through the while loop. Changing the
while loop to this will fix it:
while(chop($Machine) ne "")
--
Aaron Simmons
G066-Software Systems Eng, Lead
(703) 883-3394
AaronSimm1 (AIM)
<a246456@fmr.com> wrote in message news:3DAB0889.A72FB22C@fmr.com...
> Hi ,
>
> I wrote a script which process a text file which contains list of
> servers, and checks whether the user account exist on the remote server.
> I am getting incorrect information like User does`nt exist on machine.
>
> I am not able to find what is the problem? Could you pls help me...
>
> use Win32::NetAdmin;
> use Win32::AdminMisc;
>
> $file="hosts.txt";
> $User="Administrator";
>
> open(HOST, "$file") || die " $file does`nt exist. $!\n";
> $Machine=<HOST>;
> while($Machine ne "")
> {
>
> if( ! Win32::NetAdmin::UsersExist($Machine, $User))
> {
> print "$User does`nt exist on $Machine";
> }
> else
> {
> print "$User exist on $Machine";
> }
> $Machine=<HOST>;
> }
>
> Thanks,
> Paul
>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
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 V10 Issue 3983
***************************************