[23081] in Perl-Users-Digest
Perl-Users Digest, Issue: 5302 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 1 00:05:49 2003
Date: Thu, 31 Jul 2003 21:05:07 -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 Thu, 31 Jul 2003 Volume: 10 Number: 5302
Today's topics:
Re: <input type='image'> ... IE fails to pass value w <REMOVEsdnCAPS@comcast.net>
Re: error validation question (Julia Briggs)
Re: error validation question <uri@stemsystems.com>
how can I use modules without installation? <goodman@widewings.com>
Re: how can I use modules without installation? <kjetilskotheim@yahoo.com>
mod_perl: my $var=1 if ... <kjetilskotheim@yahoo.com>
Need help with Symbol::delete_package <newspost@coppit.org>
Re: Need help with Symbol::delete_package <uri@stemsystems.com>
pattern matching (brian liu)
Re: pattern matching (Tad McClellan)
Re: Substitution Question <bigj@kamelfreund.de>
Re: Substitution Question <mikeflan@earthlink.net>
Re: Substitution Question <mikeflan@earthlink.net>
Re: using post method (hash)
Re: using post method (hash)
Re: using post method <postmaster@[127.0.0.1]>
Re: using post method <emschwar@ldl.fc.hp.com>
Re: using post method (hash)
Re: using post method <uri@stemsystems.com>
Re: Web development and Perl 6 (Randal L. Schwartz)
Re: Web development and Perl 6 (Tad McClellan)
Re: Web development and Perl 6 <noreply@gunnar.cc>
Re: Web development and Perl 6 <uri@stemsystems.com>
Re: Web development and Perl 6 <noreply@gunnar.cc>
Re: Web development and Perl 6 <uri@stemsystems.com>
Re: Web page with frames... <mgarrish@rogers.com>
Re: win32 - kill 0 and handle leaks. <kalinabears@iinet.net.au>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 31 Jul 2003 17:56:20 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: <input type='image'> ... IE fails to pass value while Mozilla and Netsacpe works
Message-Id: <Xns93C9C0B645643sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
john_k_everett@hotmail.com (John Everett) wrote in
news:e3da9316.0307310803.6248db41@posting.google.com:
> Thanks for the insight and the abuse.
> Made me feel all warm and fuzzy inside.
I didn't think my post was abusive. I'm sorry you thought so.
> This news group is full of Perl CGI questions.
> Seemed like a wise place to post.
> Suppose not.
Nope.
- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPymepmPeouIeTNHoEQKKBgCgg9z1xTzSb2UU1VSu7pVofmW+eBkAn0m3
Ql2j8Ge8kZbIT4lAU2Xbkxr2
=ch8u
-----END PGP SIGNATURE-----
------------------------------
Date: 31 Jul 2003 18:50:03 -0700
From: julia4_me@yahoo.com (Julia Briggs)
Subject: Re: error validation question
Message-Id: <c48f65ef.0307311750.6e7a850b@posting.google.com>
Perfect. This answers my top question.
Have an excellent rest of the week....and to all the other meanies
without brains !:P
>have a look at formmail.pl in Matt's Script Archive
>-http://www.scriptarchive.com/ - it includes a
>sub-routine for checking required fields and returning
>relevant error messages.
------------------------------
Date: Fri, 01 Aug 2003 03:12:05 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: error validation question
Message-Id: <x7lluevzp6.fsf@mail.sysarch.com>
>>>>> "JB" == Julia Briggs <julia4_me@yahoo.com> writes:
JB> Perfect. This answers my top question.
JB> Have an excellent rest of the week....and to all the other meanies
JB> without brains !:P
hmm, you must be the one without a brain if you follow this
advice. matt's scripts are even deprecated by matt himself. can you get
that?
>> have a look at formmail.pl in Matt's Script Archive
>> -http://www.scriptarchive.com/ - it includes a
>> sub-routine for checking required fields and returning
>> relevant error messages.
and it is broken, unsecure and unsupported. 3 strikes. i must be a real
meanie. but better that than brainless as you wish to be.
do you always listen to nice people even if they are wrong? not a good
way to go through life.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Fri, 1 Aug 2003 12:12:02 +0900
From: "À±ÂùÈ£" <goodman@widewings.com>
Subject: how can I use modules without installation?
Message-Id: <bgclnn$9ab$1@news.hananet.net>
hi~
I want to use module in linux.
but I can't install modules.
in telnet I trying to install modules , but 'make' command is not allowed to
me.
I'm not administrator, I have normal user account.
I try to insert directory which is containing module files to @INC.
but I failed.
I had read article about this problem in somewhere , but I can't remember it
clearly.
how can I using modules in this situation?
and Time::HiRes modules is possible?
-------------------------------------
Widewings Company, Korea.
Tel : +82-52-900-9888
Fax : +82-52-261-9750
Cellphone : +82-17-5738281
Email : goodman@widewings.com
------------------------------
Date: Fri, 01 Aug 2003 05:38:02 +0200
From: Kjetil Skotheim <kjetilskotheim@yahoo.com>
Subject: Re: how can I use modules without installation?
Message-Id: <oprs7i1ox185yxzq@nntp.uio.no>
On Fri, 1 Aug 2003 12:12:02 +0900, À±ÂùÈ£ <goodman@widewings.com> wrote:
> hi~
> I want to use module in linux.
> but I can't install modules.
> in telnet I trying to install modules , but 'make' command is not allowed
> to me. I'm not administrator, I have normal user account.
>
> I try to insert directory which is containing module files to @INC.
> but I failed.
>
> I had read article about this problem in somewhere , but I can't remember
> it clearly.
>
> how can I using modules in this situation?
> and Time::HiRes modules is possible?
Have you tried:
tar xvf tarball.tar (or tar zxvf tarball.tgz)
cd thenewdirectory
perl Makefile.PL PREFIX=foo
make test
make install PREFIX=bar
Where you replace foo and bar with names of directories that you own.
For example:
echo $HOME (should see full path to you home direcory now)
mkdir $HOME/myperl
perl Makefile.PL PREFIX=$HOME/myperl
...or maybe use PREFIX only in make install, not in perl Makefile.PL
(I dont remember). I think not all modules can be installed this way,
but many can. Even modules that depends on C-compilation if you have
correct access to that compilator.
--
Kjetil Skotheim
------------------------------
Date: Fri, 01 Aug 2003 05:25:10 +0200
From: Kjetil Skotheim <kjetilskotheim@yahoo.com>
Subject: mod_perl: my $var=1 if ...
Message-Id: <oprs7if8d985yxzq@nntp.uio.no>
I'm having trouble understanding something in mod_perl. The sub handler is:
sub handler
{
...stuff deleted...
my $var=1 if ...condition_A...;
$var=2 if ...condition_B...; if($var){
...someting....
}
}
The IF-block are entered sometimes when both condition_A and B
are false! How can that be? If I do the following instead then
everyting works ok:
my $var; #lexical declaration without if
$var=1 if ...condition_A...;
$var=2 if ...condition_B...;
I suspect that $var is preserved from the previous apache-request
on the same process. Can anyone confirm this?
Should "my $var=... if ..." be totally avoided in mod_perl?
--
Kjetil Skotheim
------------------------------
Date: Fri, 01 Aug 2003 02:27:42 GMT
From: David Coppit <newspost@coppit.org>
Subject: Need help with Symbol::delete_package
Message-Id: <Pine.BSF.4.56.0307312223320.53776@www.provisio.net>
Hi all,
I'm trying to do speed comparisons of two versions of a module. To do
this, I'm unshifting the directory for the module and then require'ing it.
I'm trying to use Symbol::delete_package to "unload" the module before
doing the same series of steps for the other version in a different
directory. However, it seems that delete_package is permanent--I get an
undefined subroutine error even after re-require'ing the module. Below is
a script that demonstrates the problem.
use Symbol;
require Storable;
Symbol::delete_package('Storable');
# Re-require package
require Storable;
$s = Storable::freeze([1,2,3]);
Does anyone know what the problem is?
Thanks,
David
------------------------------
Date: Fri, 01 Aug 2003 03:14:23 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Need help with Symbol::delete_package
Message-Id: <x7he52vzlc.fsf@mail.sysarch.com>
>>>>> "DC" == David Coppit <newspost@coppit.org> writes:
DC> I'm trying to do speed comparisons of two versions of a module. To do
DC> this, I'm unshifting the directory for the module and then require'ing it.
DC> I'm trying to use Symbol::delete_package to "unload" the module before
DC> doing the same series of steps for the other version in a different
DC> directory. However, it seems that delete_package is permanent--I get an
DC> undefined subroutine error even after re-require'ing the module. Below is
DC> a script that demonstrates the problem.
DC> use Symbol;
DC> require Storable;
DC> Symbol::delete_package('Storable');
i doubt that is needed in general. successful loading of the module will
just overwrite the subs.
DC> # Re-require package
DC> require Storable;
require checks the %INC hash if it was loaded already. it won't reload
if it has. you have to delete the module from that hash to force a reload.
was i too mean to you? :)
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 31 Jul 2003 16:02:51 -0700
From: xliu75@yahoo.com (brian liu)
Subject: pattern matching
Message-Id: <89796311.0307311502.238111cc@posting.google.com>
i got pop0.htm file, I want to get value between <TD> and </TD>
and put into one array.
like a[0]=a1 a[1]=b a[2]=a2 a[3]=a3
pop0.htm
<HTML>
<HEAD>
</HEAD>
<BODY bgColor=#ffffff>
<TABLE border=1>
<TR>
<TD>a1</TD>
<TD>b</TD> <TD>a2</TD>
<TD>a3</TD>
</TR>
<TABLE>
</BODY>
</HTML>
I use perl code pop0.pl below:
$defaultDir='d:\haha';
$inputFile='pop\d+\.htm';
#Output files
$tempOutput = $defaultDir.'\tempOutput.txt';
#Clear files
unlink $tempOutput;
main($defaultDir);
sub main()
{
#$err= opendir THISDIR,$_[0];
if( ! opendir THISDIR,$_[0] ) {
print "Faild to open $_[0]\n";
die;
}
my @dataFiles = grep /$inputFile/ , readdir THISDIR; # Get all
data.* files
closedir THISDIR;
openFiles();
sort @dataFiles;
foreach $file (@dataFiles){
processFile($file);
}
closeFiles();
print "Done.\n";
}#main
sub processFile()
{
local $path=$defaultDir;
local $dataF = $_[0];
print "Processing $_[0] ...\n";
$count=1;
open DF,$path.'/'.$dataF or print "Error opening file $dataF, at
$path \n Error: $!\n";
while(<DF>){
if(/^$/){next;}
if ($count<5){
if(/<TD>(a\d+)<\/TD>/|/<TD>(b)<\/TD>/){
@a[$count]=$1;
if ($2!=null){
}
print "$count @a[$count] \t";
$count++;
}
}
}
}
# --- DB access methods --------
sub openFiles()
{
open S,'>>'.$tempOutput or print "Error opening file $tempOutput \n
Error: $!\n";
}
sub closeFiles()
{
close S;
}
and get print out is like
a[0]=a1 a[1]=b a[2]=a3 done;
it seems like after match first <TD></TD> then didn't match the rest
of this line, just go to next line
How can I match first pattern in one line and then match again using
same pattern or other pattern in the same line , in perl?
Thanks a lot
Brian
------------------------------
Date: Thu, 31 Jul 2003 19:03:07 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: pattern matching
Message-Id: <slrnbijbhr.288.tadmc@magna.augustmail.com>
brian liu <xliu75@yahoo.com> wrote:
> $defaultDir='d:\haha';
or
$defaultDir='d:/haha';
> $tempOutput = $defaultDir.'\tempOutput.txt';
or
$tempOutput = "$defaultDir/tempOutput.txt";
> local $path=$defaultDir;
You should always prefer my() over local(), except when you can't.
Space characters are not a scarce resourse, feel free to use
as many as you need to make your code easier to read:
my $path = $defaultDir;
> open DF,$path.'/'.$dataF or print "Error opening file $dataF, at
or
open DF, "$path/$dataF" or print "Error opening file '$dataF', at
> $path \n Error: $!\n";
> while(<DF>){
You _want_ to plow ahead and read nothing from the file if
the open() failed?
That seems a strange thing to want...
> if(/^$/){next;}
or
next if /^$/;
or
next unless length;
> if(/<TD>(a\d+)<\/TD>/|/<TD>(b)<\/TD>/){
^
^
Using the "bitwise or" there is dangerous, you should use a
"logical or" instead.
or
if(/<TD>(a\d+)<\/TD>/ or /<TD>(b)<\/TD>/){
> @a[$count]=$1;
You should always enable warnings when developing Perl code!
> if ($2!=null){
You want to test if $2 is zero?
Why do you want to test for that?
If that is what you want, then you should say it more clearly:
if ( $2 != 0 ) {
> it seems like after match first <TD></TD> then didn't match the rest
> of this line, just go to next line
Yes, that is what it is supposed to do.
> How can I match first pattern in one line and then match again using
> same pattern or other pattern in the same line , in perl?
The way it says to in the description of the m// operator in:
perldoc perlop
g Match globally, i.e., find all occurrences.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 01 Aug 2003 01:18:44 +0200
From: "Janek Schleicher" <bigj@kamelfreund.de>
Subject: Re: Substitution Question
Message-Id: <pan.2003.07.31.23.13.28.829762@kamelfreund.de>
Mike Flannigan wrote at Thu, 31 Jul 2003 21:15:39 +0000:
> I simply want to convert Adkins to Adki01
>
> This code is close, but has a space between
> Adki and 01
>
> $temp =~ s/^(.{0,4})..$/$1 01/;
>
> If I take out the space, it gives an error:
> Use of uninitialized value in substitution interator" . . .
>
> I tried parens and a few other things, but none worked.
>
> I check the faqs and other documentation, but did
> not find the answer. Can anybody help?
If you want substitute characters defined in their absolute positions, the
substr function might be your friend:
substr($temp,4,2) = "01";
Greetings,
Janek
------------------------------
Date: Fri, 01 Aug 2003 02:09:24 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: Substitution Question
Message-Id: <3F29CC61.9F5D886B@earthlink.net>
biff_the_gorilla_killa wrote:
> $temp =~s/^(.{0,4})..$/${1}01/;
>
> Cheers
>
> Biff.
Thanks a bunch guys. I appreciate it.
Mike
------------------------------
Date: Fri, 01 Aug 2003 02:10:48 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: Substitution Question
Message-Id: <3F29CCB7.44CB834A@earthlink.net>
Janek Schleicher wrote:
>
> If you want substitute characters defined in their absolute positions, the
> substr function might be your friend:
>
> substr($temp,4,2) = "01";
>
> Greetings,
> Janek
Nice idea. I'm going to give this and the 'length'
function some thought tomorrow.
Mike
------------------------------
Date: 31 Jul 2003 15:21:07 -0700
From: hash_q@yahoo.com (hash)
Subject: Re: using post method
Message-Id: <634c3c13.0307311421.72dfc09a@posting.google.com>
hi Tad,
when tried running perl myscript with debugging on, i got the
following:
what does "Not proxied" means?
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: POST
http://216.129.53.44:8080/cgi-bin/send_sm_rogers.new
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 862 bytes
LWP::Protocol::collect: read 939 bytes
LWP::UserAgent::request: Simple response: OK
--------------------------------------------
tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnbihve9.a4h.tadmc@magna.augustmail.com>...
> hash <hash_q@yahoo.com> wrote:
>
> > I am trying to use the post method in perl to fill a form.
>
> > but my phone doesn't get the message.
>
>
> You need to get at least a little bit of debugging information
> before you can do any debugging...
>
>
> > use LWP::UserAgent;
>
>
> use LWP::Debug qw(+);
>
>
> > my $res = $ua->request($req);
>
>
> die 'ERROR: ', $res->status_line(), "\n", $res->error_as_HTML()
> unless $res->is_success;
>
>
> > print $res->as_string;
------------------------------
Date: 31 Jul 2003 15:23:13 -0700
From: hash_q@yahoo.com (hash)
Subject: Re: using post method
Message-Id: <634c3c13.0307311423.5e91ae55@posting.google.com>
hi greg,
I also tried using the get method, this is what i got:
"Bad configuration, the query string is not from FORM"
I thought, the site somehow knows that I didn't actually fill out the
form on the web page they specify, could this be?
thanks,
"Gregory Toomey" <NOSPAM@bigpond.com> wrote in message news:<bga8c7$m1h5p$1@ID-202028.news.uni-berlin.de>...
> "hash" <hash_q@yahoo.com> wrote in message
> news:634c3c13.0307302005.4c42c0d6@posting.google.com...
> > Hello All,
> > I am trying to use the post method in perl to fill a form. The form
> > is actually for sending an instant message to a cell phone, i
> > would like to do this automatically without going to the site.
> > I read the source file for the web page and extracted the text field
> > names, area=area code, num1=first 3 digit, num2=4 digit, text=the text
> > to send, but my phone doesn't get the message. Has anyone done this
> > before and can all forms that are fillable in a web page can be filled
> > using post method?
> >
> > thanks in advance for your help, the script i am using is given below.
>
> Are you saying this works or does not? Have you tried?
>
> Using the KISS principle I would try:
>
> #!/usr/bin/perl
> use LWP::Simple;
>
> getprint('http://216.129.53.44:8080/cgi-bin/send_sm_rogers.new?area=xxx&num1
> =xxx&num2=xxxx&text=xx');
>
> gtoomey
------------------------------
Date: Thu, 31 Jul 2003 23:39:35 +0100
From: "Dave Millen" <postmaster@[127.0.0.1]>
Subject: Re: using post method
Message-Id: <pan.2003.07.31.22.39.34.803476@[127.0.0.1]>
On Thu, 31 Jul 2003 15:23:13 -0700, hash wrote:
> hi greg,
>
> I also tried using the get method, this is what i got:
>
> "Bad configuration, the query string is not from FORM"
>
> I thought, the site somehow knows that I didn't actually fill out the
> form on the web page they specify, could this be?
<snip>
The form handler will be checking the HTTP_REFERER value and rejecting
anything that doesn't come from the expected page.
Regards,
Dave
------------------------------
Date: Thu, 31 Jul 2003 17:11:47 -0600
From: Eric Schwartz <emschwar@ldl.fc.hp.com>
Subject: Re: using post method
Message-Id: <etod6fq8f64.fsf@wormtongue.emschwar>
"Dave Millen" <postmaster@[127.0.0.1]> writes:
> The form handler will be checking the HTTP_REFERER value and rejecting
> anything that doesn't come from the expected page.
s/come from/claim to $&/
-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
------------------------------
Date: 31 Jul 2003 18:12:37 -0700
From: hash_q@yahoo.com (hash)
Subject: Re: using post method
Message-Id: <634c3c13.0307311712.3b39f924@posting.google.com>
"Dave Millen" <postmaster@[127.0.0.1]> wrote in message news:<pan.2003.07.31.22.39.34.803476@[127.0.0.
> On Thu, 31 Jul 2003 15:23:13 -0700, hash wrote:
>
> > hi greg,
> >
> > I also tried using the get method, this is what i got:
> >
> > "Bad configuration, the query string is not from FORM"
> >
> > I thought, the site somehow knows that I didn't actually fill out the
> > form on the web page they specify, could this be?
>
> <snip>
>
> The form handler will be checking the HTTP_REFERER value and rejecting
> anything that doesn't come from the expected page.
>
So is this mean that it is impossible to use perl to post to this site,
or is there a way to make it think that it comes from the form?
> Regards,
> Dave
------------------------------
Date: Fri, 01 Aug 2003 01:32:43 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: using post method
Message-Id: <x7u192w4as.fsf@mail.sysarch.com>
>>>>> "ES" == Eric Schwartz <emschwar@ldl.fc.hp.com> writes:
ES> "Dave Millen" <postmaster@[127.0.0.1]> writes:
>> The form handler will be checking the HTTP_REFERER value and rejecting
>> anything that doesn't come from the expected page.
ES> s/come from/claim to $&/
don't use $& as it will slow down all the other regexes in your usenet
posts.
:-)
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Thu, 31 Jul 2003 23:53:07 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Web development and Perl 6
Message-Id: <b509677645718d628d0dff845a6580f1@free.teranews.com>
>>>>> "Gunnar" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
Gunnar> Benefit for you? Maybe. Benefit for Perl? Personally I'm not convinced.
What an amazingly web-centric view of the world! I know many seasoned
Perl programmers who have never written a CGI script in their lives.
print "Just another Perl hacker,"
--
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: Thu, 31 Jul 2003 18:43:32 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Web development and Perl 6
Message-Id: <slrnbijad4.288.tadmc@magna.augustmail.com>
Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> I know many seasoned
> Perl programmers who have never written a CGI script in their lives.
me <raises hand>
(except as a hobbyist)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 01 Aug 2003 02:55:17 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Web development and Perl 6
Message-Id: <bgce21$nk32u$1@ID-184292.news.uni-berlin.de>
Randal L. Schwartz wrote:
> Gunnar Hjalmarsson wrote:
>> Charlton Wilbur wrote:
>>
>>>> New web developers are turning to PHP. I wish it were
>>>> otherwise as I love using Perl. However, mod_perl hosts are
>>>> very thin on the ground. If new students can get free
>>>> PHP/MySQL hosting to learn web development they're going to
>>>> choose that over the complexity and relative unavailability
>>>> of mod_perl.
>>>
>>> Let them!
>>>
>>> It does me more benefit if the novice web users all use PHP and
>>> MySQL, because *I* know Perl. So when someone needs a job
>>> done that's too big for PHP and MySQL, they'll turn to Perl and
>>> Postgres or Oracle. Benefit for me: the easy, boring stuff is
>>> being handled by eager PHP kiddies. Benefit for me: few people
>>> know how to handle the hard, interesting stuff. How is this a
>>> bad thing?
>>
>> Benefit for you? Maybe. Benefit for Perl? Personally I'm not
>> convinced.
>
> What an amazingly web-centric view of the world! I know many
> seasoned Perl programmers who have never written a CGI script in
> their lives.
Hmm.. That comment does require an explanation, Randal.
CGI scripting is (almost) all I'm using Perl for. But that is
irrelevant for this discussion.
Personally I believe that any program needs a big user base, and
through the web, you reach a big audience. Sometimes I feel that
regulars in this group deliberately and actively discourage Perl and
CGI from being used for trivial web scripting, and _that_ amazes _me_.
I smell snobbery.
Isn't CGI scripts on the web _one_ important application field for
Perl? You don't need to have a "web-centric view" to acknowledge that,
do you?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 01 Aug 2003 01:31:28 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Web development and Perl 6
Message-Id: <x7wudyw4cw.fsf@mail.sysarch.com>
>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
GH> Personally I believe that any program needs a big user base, and
GH> through the web, you reach a big audience. Sometimes I feel that
GH> regulars in this group deliberately and actively discourage Perl and
GH> CGI from being used for trivial web scripting, and _that_ amazes
GH> _me_. I smell snobbery.
perl has over 1 million coders worldwide. and most don't use it for the
web. you don't seem to understand how broad and deep perl's penetration
is and how little of it is webcentric. perl would be still very popular
even if it was never used for the web. that is critical to understand.
as for snobbery, it is annoying (not snobbish) that perl has a rep for
being the web language. matt's crap archives did a lot for that. early
web cgi was almost only in perl. and still beginner cgi is usually in
perl since som many (bad) perl scripts are out there for the kiddies to
use.
but do you realize perl is used in genomics, database systems,
communications, (non-web) networking, parsing, natural language,
etc. just look at cpan (have you really ever browsed cpan's top
levels?). by far and away it has so many more non-web modules than web
stuff. and the net in general is much bigger than the web. do you ever
hear newbies (or the clueless) conflate the web and the net? i see it
all the time.
GH> Isn't CGI scripts on the web _one_ important application field for
GH> Perl? You don't need to have a "web-centric view" to acknowledge that,
GH> do you?
it is just one application. importance is irrelevant. and it is not a
large slice of perl's application world. you still don't get it. perl is
much bigger than the web. the net is much bigger than the web. the web
is just the most visible net service and the most well known by most
users. that doesn't make it important.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Fri, 01 Aug 2003 04:06:27 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Web development and Perl 6
Message-Id: <bgci7i$moo0t$1@ID-184292.news.uni-berlin.de>
Uri Guttman wrote:
> perl has over 1 million coders worldwide. and most don't use it for
> the web.
Okay, I believe you. Have no base for claiming anything else.
> you don't seem to understand how broad and deep perl's penetration
> is and how little of it is webcentric.
Since I didn't mention anything about Perl's penetration, you have no
base for claiming that I don't "understand".
> as for snobbery, it is annoying (not snobbish) that perl has a rep
> for being the web language. matt's crap archives did a lot for
> that. early web cgi was almost only in perl. and still beginner cgi
> is usually in perl since som many (bad) perl scripts are out there
> for the kiddies to use.
It's annoying you say. But does it hurt Perl? Can't it rather be that
it has contributed to Perl's penetration also in other fields but web
scripting?
Sometimes they say that "all publicity is good publicity". :)
> but do you realize perl is ...
<snipped long list of example apps>
Let me summarize my degree of "understanding" with: I know something.
> GH> Isn't CGI scripts on the web _one_ important application
> GH> field for Perl? You don't need to have a "web-centric view"
> GH> to acknowledge that, do you?
>
> it is just one application. importance is irrelevant. and it is not
> a large slice of perl's application world. you still don't get it.
What is it I don't get?? Please go back and check what's the topic for
this thread. You are so preoccupied by questioning my knowledge in
general that you miss the point.
The point I was trying to make is:
- Some people in this group seem to believe it is good for Perl if
"newbies" opt for PHP before Perl/CGI for web scripting.
- I expressed my doubts about that view.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 01 Aug 2003 03:09:35 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Web development and Perl 6
Message-Id: <x7oezavztc.fsf@mail.sysarch.com>
>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
GH> The point I was trying to make is:
GH> - Some people in this group seem to believe it is good for Perl if
GH> "newbies" opt for PHP before Perl/CGI for web scripting.
GH> - I expressed my doubts about that view.
more like it doesn't matter to perl what they choose for web stuff since
web stuff is a fraction of the entire perl world. just wait until the
newbies do something real and try to use php for genomics or parsing.
the point is not to fret over what people use for web apps. it is
nothing compared to the large picture.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Fri, 01 Aug 2003 00:33:11 GMT
From: "mgarrish" <mgarrish@rogers.com>
Subject: Re: Web page with frames...
Message-Id: <bziWa.34192$hOa.28630@news02.bloor.is.net.cable.rogers.com>
"Eric Schwartz" <emschwar@ldl.fc.hp.com> wrote in message
news:eton0eua93o.fsf@wormtongue.emschwar...
>
> Yes, people do a lot of things with Perl; that doesn't make questions
> about them Perl questions. I'm writing a library-cataloguing system
> in Perl right now; does that make comp.lang.perl.misc a good place to
> ask if I should use Library of Congress or Dewey-Decimal indexing?
> (In the short term, probably LoC, only because I can easily query
> their database using Net::Z3950, but I'd like to offer both.)
>
And a lot of people offer that same incredibly trite answer, which is
equally pointless. For one, the offenders obviously don't know where they
should be posting, so being a prick does nothing but make yourself look like
a moron. Second, it's not going to change anything; the people who post
off-topic questions are usually the ones who have never looked for the
answer. And finally, it does nothing to help the poster find his way to
where he should be posting. (And I'm referring more to the resident jackass
in this group who posted the earlier reply.) If you don't like off-topic
posts, stick to a moderated group...
Matt
(who eagerly awaits the day someone creates a way to send an e-slap)
------------------------------
Date: Fri, 1 Aug 2003 11:54:10 +1000
From: "Sisyphus" <kalinabears@iinet.net.au>
Subject: Re: win32 - kill 0 and handle leaks.
Message-Id: <3f29c950$0$23613$5a62ac22@freenews.iinet.net.au>
"W K" <hyagillot@tesco.net> wrote in message
news:bgatab$b1a$1@titan.btinternet.com...
> I have a process that needs to check pids of other processes on win2000.
>
> However, whenever when I do a kill 0, $pid - the number of handles (seen
in
> task manager) goes up by one.
>
> As the process does this every minute non-stop, this gets to be a large
> number of processes.
>
> Is this a known bug/feature/mistake? Is there anything I should be doing
to
> clean up these handles?
>
>
>
> The following replicates the problem - note that the "3004" must be a
> process that is currently running.
>
> for (1..5){
>
> sleep 2;
>
> for (1..100){kill 0,3004 }
>
> }
>
> print "press return";$_=<STDIN>;
>
>
>
Afaict, you're doing nothing wrong - and when I run your script I see
precisely what you're seeing (with both perl 5.6.1 and 5.8.0).
I can't find any documentation warning of this behaviour and I can't find
any way of clearing those handles without having the script exit.
(Just stop and re-start the checking process
every-so-often :-)
Alternatively you can probably achieve what you're after with one of the
Win32 modules. Win32::PerfLib ( http://www.bybyte.de/jmk/Perl5.asp ) should
accommodate your needs, or Win32::Process::Info (from cpan) might also do
it.
Cheers,
Rob
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
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 5302
***************************************