[27046] in Perl-Users-Digest
Perl-Users Digest, Issue: 8955 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 15 00:05:58 2006
Date: Tue, 14 Feb 2006 21:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 14 Feb 2006 Volume: 10 Number: 8955
Today's topics:
Re: arrays tripping me up <matthew.garrish@sympatico.ca>
Re: Why can't JavaScript work when embeded in Perl CGI <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 14 Feb 2006 22:59:33 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: arrays tripping me up
Message-Id: <BGxIf.26269$T35.436176@news20.bellglobal.com>
"Jim Gibson" <jgibson@mail.arc.nasa.gov> wrote in message
news:140220061727512245%jgibson@mail.arc.nasa.gov...
> In article <YbtIf.25913$T35.398649@news20.bellglobal.com>, Matt Garrish
> <matthew.garrish@sympatico.ca> wrote:
>
>> "Jim Gibson" <jgibson@mail.arc.nasa.gov> wrote in message
>> news:140220061245553470%jgibson@mail.arc.nasa.gov...
>> > In article <43f2374f$0$23279$db0fefd9@news.zen.co.uk>, Obantec Support
>> > <usenet@NOSPAM.obantec.net> wrote:
>
> [problem processing array]
>
>> >
>> > Use a C-style for loop (untested):
>> >
>> > for( my $i = 0; $i < @result; $i++ ) {
>>
> [snipped snippet un-snipped:]
>
>> for my $i (0..$#result) {
>> if( $result[$i] =~ /$nic_nam/ ) {
>> print "Match found: $result[$i];
>> while( $result[$i+1] != /^\s*$/ ) {
>> print $result[++$i];
>> }
>> }
>> }
>>
>> This is a Perl group after all... : )
>
>
> Did you try it? Your suggestion doesn't work. The OP wanted to print
> non-blank lines occuring in the array after any element matching a
> regex was encountered.
>
You caught me. I get so tired of seeing needless c-style loops that I missed
the ++$i. My bad... (and no, I don't test other people's untested code!)
Matt
------------------------------
Date: Tue, 14 Feb 2006 19:18:22 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Why can't JavaScript work when embeded in Perl CGI code?
Message-Id: <slrndv50au.1qf.tadmc@magna.augustmail.com>
Dave <david@nospam.com> wrote:
> Subject: Why can't JavaScript work when embeded in Perl CGI code?
Because JavaScript and Perl are different languages.
> I had a working Perl CGI code which generates HTML page based on the
> paramaeters.
>
> I want to add a little JavaScript function
Then put it in a Perl print() statement.
CGI programs run on the server.
JavaScript runs on the client (browser), so you need to send
the code to the client for execution.
> But it comes error like this
> "500 Server Error
> The server encountered an internal error or misconfiguration and was unable
> to complete your request."
perldoc -q 500
My CGI script runs from the command line but not the browser. (500
Server Error)
What did it say in your server error log?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 8955
***************************************