[13487] in Perl-Users-Digest
Perl-Users Digest, Issue: 897 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 24 06:07:18 1999
Date: Fri, 24 Sep 1999 03:05:12 -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: <938167512-v9-i897@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 24 Sep 1999 Volume: 9 Number: 897
Today's topics:
Re: beauty of a Y2K bug (Sam Holden)
Re: beauty of a Y2K bug (I.J. Garlick)
Re: Calling Mac 'ToolBox' Function via MacPerl (Henry Penninkilampi)
Re: CGI sending email with attachment <krajzewicz@inx.de>
Re: CGI sending email with attachment <krajzewicz@inx.de>
Re: CGI sending email with attachment (I.J. Garlick)
generating/decompiling perl scripts thierry@kernelconsult.com
Re: generating/decompiling perl scripts <gellyfish@gellyfish.com>
Re: get newest file in a dir and write this filename in <rhomberg@ife.ee.ethz.ch>
Re: Grouping in REs, no doc found <rhomberg@ife.ee.ethz.ch>
Re: How to split one variable into two? <gellyfish@gellyfish.com>
Re: I got thousands of CRACKS 'n SERIALS onlu for U !! <gellyfish@gellyfish.com>
I see the Light! <neil@pacifier.com>
match using scalar <druttle@gb.pepperl-fuchs.com>
Re: New trolling strategy ? c_j_marshall@my-deja.com
Re: New trolling strategy ? c_j_marshall@my-deja.com
NT,IIS: works from cmdline, but not from IIS (CGI) (Paulius)
Re: NT,IIS: works from cmdline, but not from IIS (CGI) <gellyfish@gellyfish.com>
Re: Pass by reference (Tramm Hudson)
Re: Perl - CGI -MySQL KernelKlink@webtv.net
Re: Perl - CGI -MySQL c_j_marshall@my-deja.com
Re: Perl - CGI -MySQL (Sam Holden)
Re: Perl - CGI -MySQL <gellyfish@gellyfish.com>
Re: Perl - CGI -MySQL <gellyfish@gellyfish.com>
Re: Perl and Ms Personnal Web server <gellyfish@gellyfish.com>
Printing a list from the bottome to the top verses top <mattking@techie.com>
Problem with param() and CGI <m.scheferhoff@gmx.de>
Re: Problem with param() and CGI <gellyfish@gellyfish.com>
Re: Same problem for me <gellyfish@gellyfish.com>
Re: Spell Checker In Perl <gellyfish@gellyfish.com>
Re: Validating unsafe code? <madebeer@igc.apc.org>
Re: win32 perlscript for transfering files <gellyfish@gellyfish.com>
Re: Win32::ODBC.pm hangs CGI.pm under Apache p.scott@shu.ac.uk
Re: You should be admired (Graham Ashton)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Sep 1999 07:46:05 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: beauty of a Y2K bug
Message-Id: <slrn7umb1t.nou.sholden@pgrad.cs.usyd.edu.au>
On Fri, 24 Sep 1999 05:53:07 GMT, Kragen Sitaker <kragen@dnaco.net> wrote:
>
>Missing handrails like no type safety and no bounds-checking and no
>garbage collection I can understand. It makes your program faster and
>compilers simpler, and sometimes makes your program simpler, too.
>
>But what does tm_year being (year -1900) buy you? You can fit it into
>a byte instead of two bytes? It certainly doesn't make your program
>any faster or simpler, and it doesn't make the library any faster or
>simpler either. All it does is cause bugs.
It shows you who are the idiots that don't read the specs and thus
should not be employed.
--
Sam
You can write Perl programs that resemble sed, or awk, or C, or Lisp, or
Python. This is Officially Okay in Perl culture.
--Larry Wall
------------------------------
Date: Fri, 24 Sep 1999 09:39:25 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: beauty of a Y2K bug
Message-Id: <FIK5Hq.EG@csc.liv.ac.uk>
In article <37EAC19D.EC799F75@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> writes:
> Hmmm. Maybe I'll take a break from this NG starting 12/29/99
> for about two weeks. mrbog@my-deja.com can answer all those
> questions in my stead. Okay?
You took the thought right out of my mind David.
You can just see it. We all trudge into work or sit down bleary eyed at
our terminals after 3 days of celabration and pear confusedly at our news
readers and wonder why it's taking 10 minures to respond.
The answer will dawn on us just as the numbers on our subscibed news
groups come up.
comp.lang.perl.misc 14,567,431
comp.lang.perl.mod 233,933
A month long holiday is sounding good but probably not long enough to
avoid any of the impending idiocy that si about to descend on us in what,
98 days? 99, 100. I give it about a week before we will see the full imapct.
--
Ian J. Garlick
ijg@csc.liv.ac.uk
It's a damn poor mind that can only think of one way to spell a word.
-- Andrew Jackson
------------------------------
Date: Fri, 24 Sep 1999 17:29:45 +0930
From: spamfree@metropolis.net.au (Henry Penninkilampi)
Subject: Re: Calling Mac 'ToolBox' Function via MacPerl
Message-Id: <spamfree-2409991729460001@d5.metropolis.net.au>
Samuel,
I don't have an aswer for you, but if you go to <http://www.macperl.com/>
and subscribe to the 'MacPerl-Toolbox' mailing list and ask your question
there, I'm sure someone can put you on the right track quickly.
Henry.
------------------------------
Date: Fri, 24 Sep 1999 11:35:16 +0200
From: Daniel Krajzewicz <krajzewicz@inx.de>
To: Burt Hwang <BurtHwangSPAMSUCKS@SPAMSUCKS.ufsltd.com>, Daniel Krajzewicz <krajzewicz@inx.de>
Subject: Re: CGI sending email with attachment
Message-Id: <37EB45D4.2AC1C5CE@inx.de>
Burt Hwang wrote:
> =
> To tell you the truth, I don't really know what I'm doing. But as I've=
> observed from other email source codes, it looks like you would define =
a
> boundary, then use it with "--" before each. Am I wrong? To me, it lo=
oks
> like I AM using the same boundary, no? Here's my code again and sample=
> email source(see bottom)
> =
> Jonathan Stowe wrote in message <37ea48ed_1@newsread3.dircon.co.uk>...
> >Burt Hwang <BurtHwangSPAMSUCKS@SPAMSUCKS.ufsltd.com> wrote:
> >>
> >>
> >> print MAIL "Content-Type: multipart/mixed; boundary=3D\"gc0y0pkb9e=
x\"\n";
> >
> >In the rest of the output you are using a different boundary. If you =
dont
> >understand what you are doing with this code then I would recommend
> >that you use the module MIME::Lite available from CPAN.
> >
> >/J\
> =
> Here's my code:
> open (MAIL, "|/usr/sbin/sendmail -t") || die "Cannot send mail\n";
> print MAIL "To:$emailto\n";
> print MAIL "From:$emailfromName <$emailfrom>\n";
> print MAIL "Subject: Proofreadme.com - job #XXXXXXX\n";
> print MAIL "MIME-Version: 1.0\n";
> print MAIL "Content-Type: multipart/mixed; boundary=3D\"gc0y0pkb9ex\"=
\n";
> print MAIL "\n--gc0y0pkb9ex\n";
> print MAIL "Content-Type: text/plain;\n
> charset=3Dus-ascii\nContent-Transfer-Encoding: 7bit\n\n";
> =
> print MAIL "Hello Everyone!!! This is a test.\n";
> print MAIL "\n--gc0y0pkb9ex\n";
> print MAIL "Content-Type: application/msword;\n name=3D\"$filename\"\=
n";
> print MAIL "Content-Disposition: attachment;\n
> filename=3D\"$filename\"\nContent-Transfer-Encoding: base64\n";
> open (FILE_FP, "DATA/attachedFile.doc");
> while (<FILE_FP>){
> print MAIL $_;
> }
> close FILE_FP;
> print MAIL "\n--gc0y0pkb9ex\n";
> close MAIL;
> =
> Here's my sample email source:
> Return-Path: <anonymous@ns2.sslsite.com>
> Received: from ns2.sslsite.com ([128.121.140.11])
> by hvmta03-stg.us.psimail.psi.net
> (InterMail v4.01.01.00 201-229-111) with SMTP
> id <19990923150941.QYPV1102.hvmta03-stg@ns2.sslsite.com>
> for <BurtHwang@ufsltd.com>; Thu, 23 Sep 1999 11:09:41 -0400
> Received: (qmail 6946 invoked by uid 682); 23 Sep 1999 15:02:31 -0000
> Date: 23 Sep 1999 15:02:31 -0000
> Message-ID: <19990923150231.6945.qmail@ns2.sslsite.com>
> To: BurtHwang@ufsltd.com
> From: Proofreadme Staff <proofreader@proofreadme.com>
> Subject: Proofreadme.com - job #XXXXXXX
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary=3D"gc0y0pkb9ex"
> X-Mozilla-Status: 8001
> X-Mozilla-Status2: 00000000
> X-UIDL: <19990923150231.6945.qmail@ns2.sslsite.com>
> =
> --gc0y0pkb9ex
Hello !!!
Is there any possibility to gain the error produced by sendmail ??
If so, ho can I do this ??
thanks a lot,
Daniel Krajzewicz
> Content-Type: text/plain;
> charset=3Dus-ascii
> Content-Transfer-Encoding: 7bit
> =
> Hello Everyone!!! Please look at the attached email for details.
> =
> --gc0y0pkb9ex
> Content-Type: application/msword;
> name=3D"testFile.doc"
> Content-Disposition: attachment;
> filename=3D"testFile.doc"
> Content-Transfer-Encoding: base64
> =D0=CF=11=E0=A1=B1=1A=E1
> --gc0y0pkb9ex
-- =
__________________________
< Daniel Krajzewicz >
>------------------------<
< krajzewicz@inx.de > =
>------------------------<
< http://www.art-so-far.de >
>------------------------<
<__________________________>
------------------------------
Date: Fri, 24 Sep 1999 11:36:02 +0200
From: Daniel Krajzewicz <krajzewicz@inx.de>
To: BurtHwang@ufsltd.com, Daniel Krajzewicz <krajzewicz@inx.de>, Daniel Krajzewicz <krajzewicz@inx.de>
Subject: Re: CGI sending email with attachment
Message-Id: <37EB4602.EDD91709@inx.de>
Burt Hwang wrote:
> =
> To tell you the truth, I don't really know what I'm doing. But as I've=
> observed from other email source codes, it looks like you would define =
a
> boundary, then use it with "--" before each. Am I wrong? To me, it lo=
oks
> like I AM using the same boundary, no? Here's my code again and sample=
> email source(see bottom)
> =
> Jonathan Stowe wrote in message <37ea48ed_1@newsread3.dircon.co.uk>...
> >Burt Hwang <BurtHwangSPAMSUCKS@SPAMSUCKS.ufsltd.com> wrote:
> >>
> >>
> >> print MAIL "Content-Type: multipart/mixed; boundary=3D\"gc0y0pkb9e=
x\"\n";
> >
> >In the rest of the output you are using a different boundary. If you =
dont
> >understand what you are doing with this code then I would recommend
> >that you use the module MIME::Lite available from CPAN.
> >
> >/J\
> =
> Here's my code:
> open (MAIL, "|/usr/sbin/sendmail -t") || die "Cannot send mail\n";
> print MAIL "To:$emailto\n";
> print MAIL "From:$emailfromName <$emailfrom>\n";
> print MAIL "Subject: Proofreadme.com - job #XXXXXXX\n";
> print MAIL "MIME-Version: 1.0\n";
> print MAIL "Content-Type: multipart/mixed; boundary=3D\"gc0y0pkb9ex\"=
\n";
> print MAIL "\n--gc0y0pkb9ex\n";
> print MAIL "Content-Type: text/plain;\n
> charset=3Dus-ascii\nContent-Transfer-Encoding: 7bit\n\n";
> =
> print MAIL "Hello Everyone!!! This is a test.\n";
> print MAIL "\n--gc0y0pkb9ex\n";
> print MAIL "Content-Type: application/msword;\n name=3D\"$filename\"\=
n";
> print MAIL "Content-Disposition: attachment;\n
> filename=3D\"$filename\"\nContent-Transfer-Encoding: base64\n";
> open (FILE_FP, "DATA/attachedFile.doc");
> while (<FILE_FP>){
> print MAIL $_;
> }
> close FILE_FP;
> print MAIL "\n--gc0y0pkb9ex\n";
> close MAIL;
> =
> Here's my sample email source:
> Return-Path: <anonymous@ns2.sslsite.com>
> Received: from ns2.sslsite.com ([128.121.140.11])
> by hvmta03-stg.us.psimail.psi.net
> (InterMail v4.01.01.00 201-229-111) with SMTP
> id <19990923150941.QYPV1102.hvmta03-stg@ns2.sslsite.com>
> for <BurtHwang@ufsltd.com>; Thu, 23 Sep 1999 11:09:41 -0400
> Received: (qmail 6946 invoked by uid 682); 23 Sep 1999 15:02:31 -0000
> Date: 23 Sep 1999 15:02:31 -0000
> Message-ID: <19990923150231.6945.qmail@ns2.sslsite.com>
> To: BurtHwang@ufsltd.com
> From: Proofreadme Staff <proofreader@proofreadme.com>
> Subject: Proofreadme.com - job #XXXXXXX
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary=3D"gc0y0pkb9ex"
> X-Mozilla-Status: 8001
> X-Mozilla-Status2: 00000000
> X-UIDL: <19990923150231.6945.qmail@ns2.sslsite.com>
> =
> --gc0y0pkb9ex
Hello !!!
Is there any possibility to gain the error produced by sendmail ??
If so, ho can I do this ??
thanks a lot,
Daniel Krajzewicz
> Content-Type: text/plain;
> charset=3Dus-ascii
> Content-Transfer-Encoding: 7bit
> =
> Hello Everyone!!! Please look at the attached email for details.
> =
> --gc0y0pkb9ex
> Content-Type: application/msword;
> name=3D"testFile.doc"
> Content-Disposition: attachment;
> filename=3D"testFile.doc"
> Content-Transfer-Encoding: base64
> =D0=CF=11=E0=A1=B1=1A=E1
> --gc0y0pkb9ex
-- =
__________________________
< Daniel Krajzewicz >
>------------------------<
< krajzewicz@inx.de > =
>------------------------<
< http://www.art-so-far.de >
>------------------------<
<__________________________>
------------------------------
Date: Fri, 24 Sep 1999 09:48:56 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: CGI sending email with attachment
Message-Id: <FIK5xK.L3@csc.liv.ac.uk>
In article <vvsG3.6202$QJ.362386@typ11.nn.bcandid.com>,
kragen@dnaco.net (Kragen Sitaker) writes:
> Actually, Burt Hwang is correct. From RFC 1521:
> The Content-Type field for multipart entities requires one parameter,
> "boundary", which is used to specify the encapsulation boundary. The
> encapsulation boundary is defined as a line consisting entirely of
> two hyphen characters ("-", decimal code 45) followed by the boundary
> parameter value from the Content-Type header field.
I though the preceeding blank line was necessary as well. ie like Burt did
"\n--whatever"
Whoever he did get something wrong.
print MAIL "\n--gc0y0pkb9ex\n";
close MAIL;
that last line should be
print MAIL "\n--gc0y0pkb9ex--\n";
according to everything I have read.
--
Ian J. Garlick
ijg@csc.liv.ac.uk
It's a damn poor mind that can only think of one way to spell a word.
-- Andrew Jackson
------------------------------
Date: Fri, 24 Sep 1999 10:32:00 +0200
From: thierry@kernelconsult.com
Subject: generating/decompiling perl scripts
Message-Id: <37EB3700.70FF2F0E@kernelconsult.com>
Hello,
I heard that it was possible to generate a binary executable with Perl.
I tried the activestate distribution perlcc (on win95) but the command
loops.
To what extent is that true?
Is it a standalone executable file?
On all OSes?
Is it faster than the script?
Can we decompile it afterwards? (Deparse switch I suppose)
If you had examples it would be helpful.
Thanks
------------------------------
Date: 24 Sep 1999 10:14:14 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: generating/decompiling perl scripts
Message-Id: <37eb40e6_2@newsread3.dircon.co.uk>
thierry@kernelconsult.com wrote:
> Hello,
> I heard that it was possible to generate a binary executable with Perl.
> I tried the activestate distribution perlcc (on win95) but the command
> loops.
>
> To what extent is that true?
Is what true ?
> Is it a standalone executable file?
No
> On all OSes?
Unspecified.
> Is it faster than the script?
No. Read the FAQ.
> Can we decompile it afterwards? (Deparse switch I suppose)
>
Not back to Perl - assembler easy enough though ...
> If you had examples it would be helpful.
>
I have found no reason to use it myself.
/J\
--
"Shhh! They're strapping down Liza Minelli" - Lisa Simpson
------------------------------
Date: Fri, 24 Sep 1999 10:44:37 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: get newest file in a dir and write this filename in a file
Message-Id: <37EB39F5.873EEBB7@ife.ee.ethz.ch>
David Cassell wrote:
>
> Pino Calzo wrote:
> [snip of Alex's response]
>
> > now, the output should be put in a variable for later use. i need to
> > write the filename into a second file (actually scan the file and
> > replace the current .aml file with the newest one.
>
> Excuse me, but this sounds embarrassingly like you wanted
> someone else to write all your code for you. Surely that
> can't be the case. You're writing .aml files [in ARC/INFO
> perhaps?], so surely you are willing to learn just enough
> sh or Perl to complete this task.. or to pay some consultant
> to do so...
That sounds good... He could pay me. The stock market (where his email
is from) is only some 100m from here :-). Probably he does pay me, as
I'm working in a federal University :-)
- Alex
------------------------------
Date: Fri, 24 Sep 1999 11:08:03 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Grouping in REs, no doc found
Message-Id: <37EB3F73.911DC02A@ife.ee.ethz.ch>
Kragen Sitaker wrote:
> Alex Rhomberg <rhomberg@ife.ee.ethz.ch> wrote:
> >I don't want to rewrite it. IMHO something along the following lines is
> >missing from perlre:
> >
> ><PROPOSED DOC TEXT>
> >If a subpattern in parentheses is followed by a quantifier ?*+{}, the
> >value stored in the corresponding \<digit> or $<digit> is the last match
> >of the subpattern (the empty string if the subpattern didn't match).
>
> This is, unfortunately, not correct.
[snip]
> my $string = 'How old is your CAT?';
> $string =~ /(CAT)/; # succeeds
> $string =~ /(flibberti-gibbet)/; # fails
> print "$1\n"; # prints CAT
You missed the 'if followed by a quantifier'. 'If match is successful'
should probably be added.
It seems that nobody found this in perlre. IMHO it should be there. Can
we do something to get it included?
- Alex
------------------------------
Date: 24 Sep 1999 09:38:32 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to split one variable into two?
Message-Id: <37eb3888_2@newsread3.dircon.co.uk>
Tal Yarkoni <tyarkoni@chat.carleton.ca> wrote:
> This is a pretty straightforward question (I think)... I'm a beginner and
> need to know how I can create two strings from one.. I don't mean
> splitting the content of the variable; I mean creating two variables of
> the same name plus something like 1 or 2 appended to the end... so for example
> if i have a foreach loop going I'm aware I can define a new variable with
> $$x (where
> $x is any given key in the array).. that works fine. What I need though is
> to split the resulting variable into 1 and 2... so let's say $x happens to
> be "test"... how can I create two variables, $test1 and
> $test2? Using $$x{"1"} works, but of course I'd rather have a variable
> that ends with 1 than {"1"}. Can anyone please tell me what the proper syntax
> is? Thanks.
>
There is almost never a good reason to use symbolic references in this way.
You ought to try to do what you are attempting by using a hash and by the
sounds of things you will probably be wanting to use a hash of hashes i.e.
$variables{'test'}{'1'}
/J\
--
"While we've been on the air we've had reports that Prince Charles has
eaten beef on the bone" - Justin Webb, BBC One O'Clock News
------------------------------
Date: 24 Sep 1999 09:01:00 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I got thousands of CRACKS 'n SERIALS onlu for U !!
Message-Id: <37eb2fbc_2@newsread3.dircon.co.uk>
David Cassell <cassell@mail.cor.epa.gov> wrote:
> Dane Strom wrote:
>>
>> Pawan Bhati wrote:
>> >
>> > HEY FRIENDS
>> > Your search for CRACKS 'n SERAILS comes to an end here.
>> > I got about 45k serials & 30k cracks on my new server. If you want you can
>> > have it all.
>>
>> So, er, anyone going to help this poor, innocent fool? (insert
>> diabolical laugh)
>
> Sure. Let's see. That many cracks on his server. Hmmm...
> <quickly does math in head>
>
> About 7 rolls of duct tape ought to be enough to patch over
> all those cracks. And a damp washcloth for all the cereal
> on the server. You think he needs to be told to turn off the
> power first?
>
Actually I think that he should take it in the bath with him - if he uses
such a thing.
/J\
--
"Some saw Noel Edmonds as a stinking slimy downmarket local rep from a
package holiday firm. His critics were less kind" - Victor Lewis-Smith,
TV Offal
------------------------------
Date: 23 Sep 1999 23:17:16 PST
From: Neil <neil@pacifier.com>
Subject: I see the Light!
Message-Id: <37eb176c.0@news.pacifier.com>
> This newsgroup raises the bar unusually high (as far as expectations on
> newbies are concerned) - higher than any other newsgroup I know of. It
> gives the group an interesting feel - elitist, almost snobbish.
> Personally, I like the vibe, but I sometimes wonder if it scares off
> potential new recruits.
This is interesting. I am a Perl beginner (can we retire the word newbie,
please?), and usually lurk rather than post in this group. Before I read
this post, I thought "these Perl people sure are rude bastards."
But reading this string made me develop a better appreciation of the
frustrations inherent in being part of a Perl group that gets 2000 posts
per week on everything from Perl to VCR programming. "Hey, I need to program
this by 9:00 pm and it's programming so the Perl people will know what
to do"
This epiphamy was reinforced by the first post I read after this one.
Through the twisted logic that MS's 'Personal Web Server' is the path to
Perl, the poster asked for help configuring his "Personal Web Server."
Hell, I am sure most people in this group would rather help him with his
VCR.
> Has anyone ever considered CFDing [comp.lang.perl.worthy] and (veteran
> Perl users) moving serious discussions to that group? That would give
> carte blanche to Abigail (et al) to shred those that stray off the yellow
> brick road. It would also lighten the tone in *this* newsgroup, which
> would make it more appealing to newbies.
No, bad idea. Lightening the tone would appealing to 'VCR programming'
and 'Personal Web Server' newbies but genuine Perl beginners will wonder
who stole the oracle.
Neil
------------------------------
Date: Fri, 24 Sep 1999 10:12:55 +0100
From: "Dann-o" <druttle@gb.pepperl-fuchs.com>
Subject: match using scalar
Message-Id: <938164573.22711.0.nnrp-13.c1edeee8@news.demon.co.uk>
I'm trying to use the match function using a scalar rather than a string,
without success. $country is the value of a field from a web form.
while ($match == 0) {
foreach $Line (@subs) {if ($Line =~ m/$country/) {
$test = $Line;
$match = 1;
}
}
}
Is there a way round this?
thanks
Dann-o
------------------------------
Date: Fri, 24 Sep 1999 08:37:22 GMT
From: c_j_marshall@my-deja.com
Subject: Re: New trolling strategy ?
Message-Id: <7sfd81$m7u$1@nnrp1.deja.com>
In article <37EA7128.D08C1540@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> wrote:
> c_j_marshall@hotmail.com wrote:
> >
> > I've just been wondering (after reading some of the recent posts to
this
> > newsgroup) whether the 12 year old children who plague most
newsgroups
> > with rubbish have just learned a new strategy to wind us all up -
namely
> > by posting sensible looking, yet consistantly off topic, mails.
>
> Having received stealth e-mails from some of those posters,
> all I can say is "I wish."
>
> A relevant quote:
> "Don't attribute malevolence to that which is explainable
> by mere incompetence."
>
> Words to live by. :-)
>
> David
"Nothings so foolproof that there isn't a fool foolish enough to fool
it". Or something.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 24 Sep 1999 08:42:36 GMT
From: c_j_marshall@my-deja.com
Subject: Re: New trolling strategy ?
Message-Id: <7sfdhq$mag$1@nnrp1.deja.com>
In article <37EA5905.AAE8B75B@ife.ee.ethz.ch>,
Alex Rhomberg <rhomberg@ife.ee.ethz.ch> wrote:
> c_j_marshall@hotmail.com wrote:
> >
> > I've just been wondering (after reading some of the recent posts to
this
> > newsgroup) whether the 12 year old children who plague most
newsgroups
> > with rubbish have just learned a new strategy to wind us all up -
namely
> > by posting sensible looking, yet consistantly off topic, mails.
> >
> > Just a thought I had after thinking for 100th time "oh come on - you
> > must know that has absolutely nothing to do with perl so why post it
> > here?"
>
> "oh come on - you must know that has absolutely nothing to do with
perl
> so why post it here?"
>
> Sorry, couldn't resist
Oh I've got one - I was in the middle of writing a perl script to
reformat and ftp a download file when all of a sudden we run out of tea
bags. Does anyone know a good grocery in Frankfurt ? :)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 24 Sep 1999 08:55:00 GMT
From: kaktusaz@takas.lt (Paulius)
Subject: NT,IIS: works from cmdline, but not from IIS (CGI)
Message-Id: <8E4B64945kaktusasusanet@news.omnitel.net>
Hello all,
while trying to connect to DBI:XBase I get the followng error:
DBD::XBase::st execute failed: Table TABLE not found: Error opening
file X:\DIR/TABLE: No such file or directory Table ACON not found:
Error opening file d:\jask/ACON: No such file or directory
but from command line it works fine.
I suspect, problem is in \/, because in program is 'X:\\DIR' and then
something goes wrong...
Thanks in advance
Paulius
------------------------------
Date: 24 Sep 1999 10:19:00 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: NT,IIS: works from cmdline, but not from IIS (CGI)
Message-Id: <37eb4204_2@newsread3.dircon.co.uk>
Paulius <kaktusaz@takas.lt> wrote:
> Hello all,
>
> while trying to connect to DBI:XBase I get the followng error:
>
> DBD::XBase::st execute failed: Table TABLE not found: Error opening
> file X:\DIR/TABLE: No such file or directory Table ACON not found:
> Error opening file d:\jask/ACON: No such file or directory
>
I assume then that you are talking about a CGI program here. If the
location where the data is is a network drive then it is unlikely that
the program has access to it - you will need to arrange the server
configuration such that the user that runs the program has the permissions
to access the network drives - then you will need to specify a UNC path
rather than a drive letter as there will be no mapping.
How you achieve the above has nothing to do with Perl and if you dont
know how to do this you will want to ask in a group that is concerned
with the configuaration of NT servers.
/J\
--
"If I was going to wear a wig I'd choose something a lot better than this"
- Barry Norman
------------------------------
Date: 24 Sep 1999 00:20:37 -0600
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: Pass by reference
Message-Id: <7sf57l$1f4@llama.swcp.com>
[posted and cc'd to (Just Another) Larry]
Larry Rosler <lr@hpl.hp.com> wrote:
> Tramm Hudson <hudson@swcp.com> says...
> ...
> > local *array = shift;
> > my $element = $array[2];
>
> Why would this code, which fails 'use strict;', be more appropriate than
> the first snippet? How much faster could it be to make it worthwhile?
First, an explanation of my error. Then a citation on the speed issue.
I had tested it in the Perl debugger with strict turned on, but it
seems that the commands given at the interactive prompt are not
required to obey the strict directive:
/tmp$ perl -de 42 -Mstrict -w
...
DB<1> $a = [qw/3 4 5 6 7/]
DB<2> *b = $a
DB<3> x @b
0 3
1 4
2 5
3 6
4 7
You are correct that it does not compile with strict enabled in a file.
Shame on me for not testing it in a "real" program. Now can we take the
issue to Sriram Srinivasan who uses the same construct on pages 43 and 44
of the Panther book? In addition to failing with the strict pragma he
also uses the special $a and $b.
Here's a quick quote from page 44, on 'Using Typeglob Aliases':
Efficient Parameter Passing
Aliases happen to be quite a bit faster than references, because
they don't need to do any dereferencing. Consider:
$a = 10;
*b = *a ; $b++ ; # 1. Increment $a indirectly through
# the typeglob
$r = \$a ; $$r++ ; # 2. Increment $a indirectly through
# the reference
Case 1 is around one and a half times faster than case 2 on my PC.
So I'll do a quick benchmark to check his results. That is the way to
resolve these sorts of issues. Right? Right.
/tmp$ cat ./timet
#!/usr/bin/perl -w
use strict;
use Benchmark;
my $count = shift || 1<<20;
timethese( $count, {
Globs => sub { no strict; my $i=10 ; *j=\$i ; $j++; },
Refs => sub { use strict; my $i=10 ; my $r=\$i; $$r++; },
});
__END__
/tmp$ ./timet
Benchmark: timing 1048576 iterations of Globs, Refs...
Globs: 11 wallclock secs (11.60 usr + 0.00 sys = 11.60 CPU)
Refs: 9 wallclock secs ( 9.90 usr + 0.01 sys = 9.91 CPU)
Oh dear. It looks like I need to submit a bug report to O'Reilly
for the next printing of _Advanced Perl Programming_. The globs are
actually slower in this case by a 20% margin. So, perhaps we can throw
yet another cherished Perl myth out the window -- just like the previous
"local vs my" speed debate.
Any more thoughts?
Tramm
--
o hudson@swcp.com tbhudso@cs.sandia.gov O___|
/|\ http://www.swcp.com/~hudson/ H 505.323.38.81 /\ \_
<< KC5RNF @ N5YYF.NM.AMPR.ORG W 505.284.24.32 \ \/\_\
0 U \_ |
------------------------------
Date: Fri, 24 Sep 1999 01:32:31 -0400 (EDT)
From: KernelKlink@webtv.net
Subject: Re: Perl - CGI -MySQL
Message-Id: <22085-37EB0CEF-48@newsd-211.iap.bryant.webtv.net>
Michael=A0Stevens wrote:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
So, how come here is suddenly the right place, purely because you
couldn't find the proper place for such a question?
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Gee Mike, do I have to spell it out for you? After I was unable to find
a MySQL newsgroup I was hoping that a Perl expert like yourself might
have run across the same problem. (Being that I am probably not the only
person in this group to use Perl to communicate with a MySQL server.)
P.S. If you ever have a question that is not 100% Perl related, don't be
afraid to post it here, I'll be the first one to help you out, or at
least point you in the right direction. You'll never have to worry that
I will degrade you or insult your intelligence in a public forum.
------------------------------
Date: Fri, 24 Sep 1999 06:50:06 GMT
From: c_j_marshall@my-deja.com
Subject: Re: Perl - CGI -MySQL
Message-Id: <7sf6us$h52$1@nnrp1.deja.com>
In article <25930-37EA5610-37@newsd-212.iap.bryant.webtv.net>,
KernelKlink@webtv.net wrote:
> c_j_marshall@hotmail.com
> wrote:
> =========
> Good question. And I'm sure the guys on the MySQL newsgroup would be
> delighted to receive it.
> But not us.
> =========
>
> Where is the MySQL newsgroup? I searched deja.com before I posted
here,
> but could not find such a newsgroup.
>
>
I have no idea, to be honest.
The only point I was making was that this is not a perl question -
really what you are doing is asking a whole bunch of perl people on the
off chance that one of them has used MySql.
Also you have done this in the perl newsgroup - which is our (and
everyone else's) little place where we like to get together and talk
about perl all day (rather than MySql).
Sorry I can't help you, though. I really have never used it.
Actually considering the volume of MySql queries I see posted on here -
perhaps you should setup a MySql newsgroup if there isn't one ? (that
would do us all a favour :)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 24 Sep 1999 07:44:13 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl - CGI -MySQL
Message-Id: <slrn7umaud.nou.sholden@pgrad.cs.usyd.edu.au>
On Fri, 24 Sep 1999 01:32:31 -0400 (EDT),
KernelKlink@webtv.net <KernelKlink@webtv.net> wrote:
>Michael Stevens wrote:
>==================
>So, how come here is suddenly the right place, purely because you
>couldn't find the proper place for such a question?
>==================
>
>Gee Mike, do I have to spell it out for you? After I was unable to find
>a MySQL newsgroup I was hoping that a Perl expert like yourself might
>have run across the same problem. (Being that I am probably not the only
>person in this group to use Perl to communicate with a MySQL server.)
So you checked the MySQL FAQ, you subscribed to whatever mailing lists
they have, you read the entire documentation?
Then you thought I can't find it, I know I'll ask in an unrelated group.
Someone there might have used MySQL.
Some people here might like bird-watching as well, so I guess you should
ask all your bird related questions here as well, if you can't find
another forum
>
>P.S. If you ever have a question that is not 100% Perl related, don't be
>afraid to post it here, I'll be the first one to help you out, or at
>least point you in the right direction. You'll never have to worry that
>I will degrade you or insult your intelligence in a public forum.
I think you meant if you have a question that is not perl related then
please mail KernelKlink@webtv.net, since he will not insult your
intelligence.
--
Sam
We prefer English to remain a rich language, quirky, sloppy, and full
of redundancy. Same for Perl.
--Larry Wall
------------------------------
Date: 24 Sep 1999 09:55:28 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl - CGI -MySQL
Message-Id: <37eb3c80_2@newsread3.dircon.co.uk>
KernelKlink@webtv.net wrote:
> I wrote a perl script that when called via a web browser, will first
> connect to a MySQL server, then add a table, then disconnect.
>
> I ran into a problem after the 10th table was added. It won't add any
> more tables even after I delete all the tables. I can still add tables
> via the command line.
>
> Is there usually an option on a MySQL server that might turn off the
> ability to add tables via a Perl/cgi-bin connect after a certain amount
> has been reached?
>
Possibly comp.database.misc or probably one of the mailing lists that are
listed on <http://www.mysql.org/doc.html> would be able to help you better
than this group as this is a question about MySQL rather than Perl.
/J\
--
"Shhh! They're strapping down Liza Minelli" - Lisa Simpson
------------------------------
Date: 24 Sep 1999 10:03:31 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl - CGI -MySQL
Message-Id: <37eb3e63_2@newsread3.dircon.co.uk>
KernelKlink@webtv.net wrote:
> Michael Stevens wrote:
> ==================
> So, how come here is suddenly the right place, purely because you
> couldn't find the proper place for such a question?
> ==================
>
> Gee Mike, do I have to spell it out for you? After I was unable to find
> a MySQL newsgroup I was hoping that a Perl expert like yourself might
> have run across the same problem. (Being that I am probably not the only
> person in this group to use Perl to communicate with a MySQL server.)
>
Being that I am almost certainly not the only person in this group who uses
a train to get to work shall I ask questions about the timetable ?
There are MySQL specific mailing lists - subscribe.
/J\
--
"I'm about to say a naughty word so if you're easily offended you can
fuck off now" - Daisy Donovan, The 11 O'Clock Show
------------------------------
Date: 24 Sep 1999 09:32:42 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl and Ms Personnal Web server
Message-Id: <37eb372a_2@newsread3.dircon.co.uk>
Karim <abdelkrim@home.com> wrote:
> Hi,
> I am new to Perl. I have recently downloaded Perl for windows and installed
> Microsoft Web Server. I just don't know how to configure Ms Personnal Web
> server to jump into Perl programming. Anybody who knows how to do it or has
> a detailed documentation I need help.
>
I assume that you have installed the Perl from Activestate if so the
documentaion that comes with it has a section entitled 'Web Server Config'.
If you havent installed that (and I strongly suggest that you do ) you
should see :
<http://www.activestate.com/ActivePerl/docs/Perl-Win32/perlwin32faq6.html>
If you have any further problems configuring your server you should ask
in the group comp.infosystems.www.servers.ms-windows
[followups set]
/J\
--
"Some saw Noel Edmonds as a stinking slimy downmarket local rep from a
package holiday firm. His critics were less kind" - Victor Lewis-Smith,
TV Offal
------------------------------
Date: Thu, 23 Sep 1999 11:44:10 +0200
From: "Matt King" <mattking@techie.com>
Subject: Printing a list from the bottome to the top verses top to bottom.
Message-Id: <7sfdfd$hso$1@news.uk.ibm.com>
How would can I print a list 'backwords'? For example I have the following:
open FH, "<list.txt";
@lines=<FH>;
close(FH);
foreach $line(@lines)
{
print "$line\n";
}
The file exists, so the error checking isn't there (yes, I know I should add
it just incase). Any way, how do I make this run from the bottom to the top
of the file verses from the top to the bottom (as this currently is). Also
how can I make the loop abort if a 'magic' number (say 12) occurs, but still
send the output until the number occurs. For example:
foreach $line(@lines)
{
print "$line\n";
$count++;
if (count > 12) { _abort_ };
}
Matt
------------------------------
Date: Fri, 24 Sep 1999 10:36:48 +0200
From: Michael Scheferhoff <m.scheferhoff@gmx.de>
Subject: Problem with param() and CGI
Message-Id: <37EB3820.A184E699@gmx.de>
Hello,
my situation:
I have a startpage with buttons.
print $cgiobj->startform( -method=>"get",
-action=>"/cgi-bin/nntp/new_posting.cgi");
print $cgiobj->submit(-name=>"Neuen Eintrag erstellen");
print $cgiobj->endform;
Pressing one button I "jump" to a cgi script which is a form with
several textfields, boxes and upload-fields. At the bottom of my cgi
form page I have a submit buttom which should serve my: if (param())
with values.
My first problem is that it seems, that a param is submitted by pressing
the button on my startpage so that my program runs directly in the
if-loop.
Does anybody know how to delete the submitted parameters?
Thanks for your help.
Michael
------------------------------
Date: 24 Sep 1999 10:11:46 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Problem with param() and CGI
Message-Id: <37eb4052_2@newsread3.dircon.co.uk>
Michael Scheferhoff <m.scheferhoff@gmx.de> wrote:
> Hello,
>
> my situation:
> I have a startpage with buttons.
>
> print $cgiobj->startform( -method=>"get",
>
> -action=>"/cgi-bin/nntp/new_posting.cgi");
> print $cgiobj->submit(-name=>"Neuen Eintrag erstellen");
> print $cgiobj->endform;
>
> Pressing one button I "jump" to a cgi script which is a form with
> several textfields, boxes and upload-fields. At the bottom of my cgi
> form page I have a submit buttom which should serve my: if (param())
> with values.
>
> My first problem is that it seems, that a param is submitted by pressing
> the button on my startpage so that my program runs directly in the
> if-loop.
>
I'm really not sure what you mean by this - param() in the context you
seem to be using it :
if(param())
{
# we got some parameters ...
}
else
{
# we didnt get any parameters
}
I think that you are going to have to show us a bit of the code that
clearly demonstrates the problem you are having - but please dont send
the whole thing - just the smallest working (or not) example that exhibits
the behaviour you are talking about.
> Does anybody know how to delete the submitted parameters?
>
The author of CGI.pm does and he kindly put this information in the
documentation.
/J\
--
"I suggest you apply some lubrication before any bending begins" -
Antoine de Caunes, Eurotrash
------------------------------
Date: 24 Sep 1999 10:32:17 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Same problem for me
Message-Id: <37eb4521_2@newsread3.dircon.co.uk>
Johan Stjernbecker <johan.stjernbecker@mbox330.swipnet.se> wrote:
> Hi Andrew!
>
> I have the same problem. If you find out how to do, please e-mail me!
>
> Johan.stjernbecker@mbox330.swipnet.se
>
> Andrew Armstrong wrote:
>
>> Does anyone know why Ikeep getting a Forbidden message when trying to run my
>> Perl programs ? I am running Apache 1.3 under windows 95 and have Perl 5.005
>> installed. I think it may be to do with the httpd.conf file but cannot find
>> anything in there that sets restrictions on certain files.
>>
The replies to the original poster pointer him in the correct direction.
The documentation that comes with the Activestate Perl has a section on
server configuration. If you cannot find the solution to the question
in there then you should ask in com.infosystems.www.servers.ms-windows
>> Any clues
>>
Apparently not.
[followups set]
/J\
--
"Most big companies don't like you very much, except hotels, airlines
and Microsoft, which don't like you at all" - Bill Bryson
------------------------------
Date: 24 Sep 1999 09:27:52 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Spell Checker In Perl
Message-Id: <37eb3608_2@newsread3.dircon.co.uk>
Mace <mace@calweb.com> wrote:
> Here is a question for you. I asked one of my very PERL smart friends if it
> was possible to make a spell check in perl. He said yes, but you needed
> some kind of moduel. Does anyone have this, know where I can get it, or how
> to make a spell checker? Please email me.
>
In addition to the suggestion by Martien - you might see my post
<http://www.deja.com/getdoc.xp?AN=484604049&fmt=text>
Which might indicate a possible way to do this.
/J\
--
"I'm about to say a naughty word so if you're easily offended you can
fuck off now" - Daisy Donovan, The 11 O'Clock Show
------------------------------
Date: Fri, 24 Sep 1999 00:41:22 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: Validating unsafe code?
Message-Id: <APC&1'0'50775dbe'a56@igc.apc.org>
qx!
Checkout perldoc Safe
It may give you some ideas.
_mike
------------------------------
Date: 24 Sep 1999 09:19:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: win32 perlscript for transfering files
Message-Id: <37eb3412_2@newsread3.dircon.co.uk>
Rick Bauman <rick@lowcountry.net> wrote:
>
> open (OUTFILE,">c:\mailfile\$file2");
>
Ding ! You may well find you have a file "c:ailfilefile2" somewhere
you should render that as ">c:/mailfile/$file2".
You should also check the success of that open before you use the
file handle:
open(OUTFILE,">c:/mailfile/$file2") || die "c:/mailfile:/$file2 - $!\n";
As you are using CGI.pm you can :
use CGI::Carp qw(fatalsToBrowser);
to report the error message to the users browser.
/J\
--
"I can't believe Elton John recorded that song again. Exactly how do you
live your life like a spurgis in the wind?" - Ronnie, Veronica's Closet
------------------------------
Date: Fri, 24 Sep 1999 08:48:04 GMT
From: p.scott@shu.ac.uk
Subject: Re: Win32::ODBC.pm hangs CGI.pm under Apache
Message-Id: <7sfds2$mk6$1@nnrp1.deja.com>
I think I've sorted this out. ODBC isn't -w safe and it puts out
an error message per database row. If there enough rows the CGI
script hangs forever.
Is this documented? Where should it be documented?
thanks
Peter
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 24 Sep 1999 06:52:06 GMT
From: graham@mirror.bt.co.uk (Graham Ashton)
Subject: Re: You should be admired
Message-Id: <slrn7um7s8.dd1.graham@wing.mirror.bt.co.uk>
In article <37EA741D.B02021D4@chaos.wustl.edu>, Elaine -HFB- Ashton wrote:
>Henry Penninkilampi wrote:
>
>> Bully for you! (I think that's the way the Brits say it?)
>
>More like "Right then, carry on." Yanks only think they say "Bully" :)
oh. perhaps I should stop saying it then...
--
Graham
------------------------------
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 897
*************************************