[9114] in Perl-Users-Digest
Perl-Users Digest, Issue: 2732 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 27 01:07:21 1998
Date: Tue, 26 May 98 22:00:23 -0700
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, 26 May 1998 Volume: 8 Number: 2732
Today's topics:
Re: alternation, grouping, and backreferences (Mike Heins)
Re: An unwelcome and undeserved slap (Thomas Bushnell, n/BSG)
Re: An unwelcome and undeserved slap <house@usq.edu.au>
Re: ASP vs CGI <metcher@spider.herston.uq.edu.au>
Re: Clearly define "free software" (Thomas Bushnell, n/BSG)
Re: Clearly define "free software" (Leslie Mikesell)
Re: Clearly define "free software" <house@usq.edu.au>
Re: Clearly define "free software" (Leslie Mikesell)
Good with pattern matches? (Ed Egan)
Re: Good with pattern matches? (brian d foy)
Re: Good with pattern matches? (Tad McClellan)
Re: help! sort data / build a database dimas@ozemail.com.au
Re: list context: || vs or <tchrist@mox.perl.com>
Re: list context: || vs or <tchrist@mox.perl.com>
Re: list context: || vs or <metcher@spider.herston.uq.edu.au>
Re: list context: || vs or <tchrist@mox.perl.com>
Re: list context: || vs or <ljz@asfast.com>
Re: list context: || vs or <danboo@negia.net>
Re: Perl/Wall lingo question <metcher@spider.herston.uq.edu.au>
Re: SECURITY - simple perlscript for taking orders (/\oo/\ the original)
Re: string to ASCII question (Tad McClellan)
What's wrong with this?? <peckss@cyberway.com.sg>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 May 1998 22:48:00 -0500
From: mikeh@minivend.com (Mike Heins)
Subject: Re: alternation, grouping, and backreferences
Message-Id: <356b7ee0.0@news.one.net>
David Boyce <David.Boyce@fmr.com> wrote:
> I recently ran into a surprising (to me, anyway) result and just
> wondered if it's documented somewhere ... I've looked in the Camel, FAQ,
> FMTEYEWTK, perlre, and perlop without finding anything that discusses
> this scenario. Trying to make an RE to extract a field from one of two
> different line formats, I wrote something which I've trimmed down to:
> % perl -we '"Y" =~ /^(X)$|^(Y)$/ && print "$1\n"'
> Which results in a warning "Use of uninitialized value at -e line 1" and
> no output when the LHS is "Y", though it succeeds when the LHS is "X".
> After some time trying to figure out why the (Y) didn't match I realized
> that in fact it *was* being matched but assigned to $2, not $1.
> Apparently the ()-counting for purposes of backreferences takes
> precedence over the | alternation, as demonstrated by the fact that this
> minor mod works (if you subtract the -w):
> % perl -e '"Y" =~ /^(X)$|^(Y)$/ && print "$1$2\n"'
> BTW, I'm perfectly aware that this test case could be written as
> /^(X|Y)$/ and would work fine, but that's just an artifact of trimming
> it down; the real code needs to extract the 2nd space-separated field
> from one line-format or the last from another, so the patterns are
> substantially different. I'm really trying to find out (a) where this
> behavior is documented (did I miss it?) and (b) is it considered a
> feature and why? Because it seems more intuitive to me that whichever
> pattern matches in this case would assign to $1.
The answer used to be:
print "$&\n";
But $& and friends cause performance problems on future regex matches.
You could easily do
print ($1 || $2) . "\n"
but it is best to do
% perl -e '"Y" =~ /^(X)$|^(Y)$/ && print "$+\n"'
The seldom-used $+ is the last pattern that matched, ala $#array.
It is coming into use more often now that $& is fallen out of favor
for performance reasons.
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
"The U.S. Senate -- white 131 Willow Lane, Floor 2 | || _ \
male millionaires working Oxford, OH 45056 | || |_) |
for YOU!" -- Dave Barry <mikeh@minivend.com> |___| _ <
513.523.7621 FAX 7501 |_| \_\
------------------------------
Date: 26 May 1998 22:05:39 -0400
From: tb@mit.edu (Thomas Bushnell, n/BSG)
Subject: Re: An unwelcome and undeserved slap
Message-Id: <u1hemxgo4cs.fsf@biohazard-cafe.MIT.EDU>
David Kastrup <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> writes:
> My correct name is David Kastrup, but everybody familiar with me calls
> me David. People insisting that nobody including my friends should
> call me familiarly "David" are not necessarily improving the
> atmosphere, whether or not there is some reasoning behind it.
You are a person. A piece of software is not a person. Pieces of
software do not have rights. People have rights, one of them is the
general right to be called what they want. Pieces of software are not
people, and enjoy no such right.
------------------------------
Date: Wed, 27 May 1998 14:10:35 +1000
From: Ron House <house@usq.edu.au>
Subject: Re: An unwelcome and undeserved slap
Message-Id: <356B923B.55CBAD61@usq.edu.au>
> Wolfgang Denk <wd@uebemc.siemens.de> writes:
> But there's a difference. I think the GNU Linux issue is valid, whereas
> calling Perl, GNU Perl wouldn't make sense.
> Let me explain why. When we talk of a kernel, it's called Linux. No doubt
> about that. When we talk of a system, I claim we should call it GNU/Linux.
> The key is understanding what we mean when we say "system". For me
> system is all the components that combined with the kernel make your
> computer sufficiently usable so you can do software development
> and write _applications_ that run on that system. So if you look at
> the base minimal system, it is predominantly indeed composed of GNU tools,
> the kernel, and some additional tools that are linux only (like the 'free'
> command). So it makes sense to talk of the GNU/Linux *system*
So there's a whole big paddock out there, and surrounding the
central Linux Kernel is a GNU patch, and around that there is
a vast prairie of non-GNU stuff that gets distributed as
Linux. But by putting the fence in _exactly_ the right position,
it surrounds a "GNU/Linux" patch, and so we call the whole
prairie GNU/Linux. Hmmm....
> The reason for the debate is that the Linux community perceives this as
> a territorial aggression against the entire work of their community, which
> is indeed very vast and greater than what is officially FSF work.
Exactly why sinking the fenceposts ONLY around the GNU bit
is seen as so dishonest and unfair to all the wonderful
people who wrote all that other free software.
> This is enhanced by the fact that when we talk of "getting Linux" we
> mean grabbing one of these CDs that includes a grand part of that work.
> That is really GNU/Linux + free applications (by many communities, Linux, Tcl,
> Perl, X11, TeX, etc...). I am not sure if FSF really means it like this,
> but that is my angle on this debate. For me the bare _system_ looks pretty
> much like a GNU system. The main difference between a bare Linux system
> and the GNU/Hurd system will be the kernel after all.
But we don't buy a Linux CD to get a BARE system, we expect
X11, Tcl, Perl, Tex, etc.
--
Ron House
house@usq.edu.au
An age is called Dark not because the light fails to shine, but
because people refuse to see it. -- James Michener, "Space"
------------------------------
Date: Wed, 27 May 1998 12:40:41 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: ASP vs CGI
Message-Id: <356B7D29.60B35634@spider.herston.uq.edu.au>
I'm no ASP expert, but I have some ASP stuff on my server alongside
perl/CGI scripts. The ASP stuff doesn't look any less complex than the
perl stuff. If you already know perl, and use CGI.pm, there's virtually
no CGI learning curve.
The ASP on my servers seems to be written in some kind of Visual Basic -
VBScript?. There's no doubt that perl is far and away the more powerful
language. However, I seem to have heard rumours that other languages,
including perl, can be used with ASP.
Hope this helps.
--
Jaime Metcher
Neil Marshall wrote:
>
> Hello! I am asked to do an investigation in server-side programming
> language. I read articles and get an impression that ASP is a more
> powerful tool and a less learning curve than CGI. Is that true? Fairy
> story? However, what I want from you PERL experts are Pro's and Con's of
> PERL programming. It would refect a decision making to choose the right
> programming language to suit with user and system requirements.
>
> Thanks,
>
> Neil
------------------------------
Date: 26 May 1998 22:09:28 -0400
From: tb@mit.edu (Thomas Bushnell, n/BSG)
Subject: Re: Clearly define "free software"
Message-Id: <u1hd8d0o46f.fsf@biohazard-cafe.MIT.EDU>
Stefaan.Eeckels@ecc.lu (Stefaan A Eeckels) writes:
> In article <356b2889.0@news.ivm.net>,
> Klaus.Schilling@home.ivm.de writes:
> > Ideas are preexistant and rememorized.
> This probably explains why the flies in my house
> get so many brilliant ideas ;-)
I believe that Klaus Schilling is referring to the opinion attributed
to Socrates in Plato's _Meno_. I don't personally believe the theory,
but it's got something in its credit--especially with regard to
mathematical constructs--like, say, computer programs. (Something, of
course, is a lot less than everything; don't expect me to start
defending the _Meno_.)
Thomas
------------------------------
Date: 26 May 1998 22:41:20 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Clearly define "free software"
Message-Id: <6kg210$s0m$1@Mercury.mcs.net>
In article <356b2889.0@news.ivm.net>, <Klaus.Schilling@home.ivm.de> wrote:
>>
>>>Intellectual property is theft from the collective consciousness, thus evil.
>>
>>Does that mean you believe that all ideas are 'discovered', as opposed
>>to being created by individual effort?
>>
>
>Ideas are preexistant and rememorized.
So there is no use in working to create something new? When do
you think all the ideas will be used up?
Les Mikesell
les@mcs.com
------------------------------
Date: Wed, 27 May 1998 13:51:22 +1000
From: Ron House <house@usq.edu.au>
Subject: Re: Clearly define "free software"
Message-Id: <356B8DBA.1F040124@usq.edu.au>
robert havoc pennington wrote:
> What the FSF actually says about this, I believe, is that if there is
> another implementation available then linking does not make your
> program a derived work, but if the GPL library is the only
> implementation, then linking can only be considered linking *with that
> implementation* and thus you are creating a derived work and must GPL
> your program.
What the FSF says and what they could prove in court are
two different things. If I write a work and sell you a
copy under a licence, and add "Oh, by the way, if you
have FSF's XYZ library, my work will actually do something"
then I am leaving it entirely up to you to decide how
to treat my work. The FSF's GNU licence has already left
it up to you to decide how you treat their work, so if you
choose to combine them that's your legal decision. I haven't
even touched FSF's work, so no way can they extend their
licence to my work. Of course, they might try to dissuade
me with FUD in the best Apple/Lotus tradition, but that's
their problem.
--
Ron House
house@usq.edu.au
An age is called Dark not because the light fails to shine, but
because people refuse to see it. -- James Michener, "Space"
------------------------------
Date: 26 May 1998 23:08:28 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Clearly define "free software"
Message-Id: <6kg3js$s7r$1@Mercury.mcs.net>
In article <35691F35.6B5E@imag.fr>, Yann Kieffer <Yann.Kieffer@imag.fr> wrote:
>
>Many people buy win95. Do you thing people buy it to help
>MS recover the cost of its development and encourage further
>such work?
I can't speak for anyone else, but yes I did that myself. It does
certain things better than other alternatives and I'd like to see
it improved even more. Keep in mind that operating systems alone
are not very interesting - the real task is to make sure that
applications are available. You can't fault MicroSoft there.
>People nowadays consider a crashing computer as something
>normal, if not necessary. Doesn't this hurt the whole
>computing community?
Mine doesn't crash. It is possible to configure any system
badly. The computing community (if there is such a thing)
should realize this.
>I do think so. And if free software helps making things
>right again, it's certainly far from achieved; how
>many decision makers know about free software?
Enough to make apache the most popular web server. I'd say
it is in approximate proportion to the usable applications,
except perhaps that no one ever takes you to lunch to encourage
you to use free software.
>People should really go out and see what's going on outside
>the computer scientists' world. Lots of amazing things
>happening, really...
Like?
Les Mikesell
les@mcs.com
------------------------------
Date: Wed, 27 May 1998 02:40:46 GMT
From: ed@vtrad.com (Ed Egan)
Subject: Good with pattern matches?
Message-Id: <356b7c31.1515779@news.poptel.org.uk>
Can anybody help me?
I need a patern match to match:
"D*****" or "****\D\*****" or "*****\D"
where * is a any alphanumeric and the "\" is a character to be
matched.
It mustn't match anything else though!
Thanks,
Ed.
------------------------------
Date: Tue, 26 May 1998 23:44:15 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Good with pattern matches?
Message-Id: <comdog-ya02408000R2605982344150001@news.panix.com>
Keywords: from just another new york perl hacker
In article <356b7c31.1515779@news.poptel.org.uk>, ed@vtrad.com (Ed Egan) posted:
>I need a patern match to match:
>
>"D*****" or "****\D\*****" or "*****\D"
>
>where * is a any alphanumeric and the "\" is a character to be
>matched.
assuming that those are literal "\"s and "D"s, and that by
alphanmeric you want [a-zA-Z0-9] (if not, just change those bits).
#individual patterns:
m/^D[a-zA-Z0-9]{5}(?!\n)$/;
m/^[a-zA-Z0-9]{4}\\D\\[a-zA-Z0-9]{5}(?!\n)$/;
m/^[a-zA-Z0-9]{5}\\D(?!\n)$/;
#grotesque over-complex monolithic pattern to hold you over until
#Eli shows up:
m/
^
(?:
D [a-zA-Z0-9]{5}
|
(?:
[a-zA-Z0-9]{4}
(?:
\\ D \\ [a-zA-Z0-9]{5}
|
[a-zA-Z0-9] \\ D
)
)
)
(?!\n)
$
/x;
>It mustn't match anything else though!
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>
other locale's are foreign
------------------------------
Date: Tue, 26 May 1998 22:21:23 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Good with pattern matches?
Message-Id: <jr0gk6.lab.ln@localhost>
Ed Egan (ed@vtrad.com) wrote:
: I need a patern match to match:
: "D*****" or "****\D\*****" or "*****\D"
: where * is a any alphanumeric and the "\" is a character to be
: matched.
/D\w{5}|\w{4}\\D\w{5}|\w{5}\\D/;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 27 May 1998 12:43:07 +1000
From: dimas@ozemail.com.au
Subject: Re: help! sort data / build a database
Message-Id: <356B7DBB.6290@ozemail.com.au>
patience wrote:
>
> Hi,
>
> I need to sort data of 1000+ subjects. I could really use some advise
> or tips. : )
>
[snip]
There is a sort utility that can probably do what you want. It handles
multiple fields, including numeric, allows case folding and lots of
other
options. It will also merge pre-sorted files to produce a final output
file.
The utility is called 'sort' which stands for 'sort on random tags'.
man sort
Frank
------------------------------
Date: 27 May 1998 01:51:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: list context: || vs or
Message-Id: <6kfri6$r9o$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, hex@voicenet.com (Matt Knecht) writes:
:> [NOTE: That's somewhat misleading, sadly. You can't ever
:> trick a list into being in scalar context. It cannot happen.
:> You cannot begin to even go down that path. The compiler knows
:> what you do not, that the power to infer context is greater than
:> the power to specify it, with apologies to Blood of the Martyr.]
:
:This quote from the Camel explains everything. It's hard to get used
:to the idea that the compiler is smarter than the operator.
I just said that. It's not in the Book.
--tom
--
If you want your program to be readable, consider supplying the argument.
--Larry Wall in the perl man page
------------------------------
Date: 27 May 1998 02:18:47 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: list context: || vs or
Message-Id: <6kft67$sss$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, mgjv@comdyn.com.au (Martien Verbruggen) writes:
:The documentation states clearly that stat returns an array. Not a list.
:
:Returns a 13-element array giving the status info for a file
That's outdated terminology. And it's a ridiculous notion. \UYou cannot
return an array\E. Look at what I wrote in perlsub:
The Perl model for function call and return values is simple: all
functions are passed as parameters one single flat list of scalars,
and all functions likewise return to their caller one single flat
list of scalars. Any arrays or hashes in these call and return
lists will collapse, losing their identities--but you may always use
pass-by-reference instead to avoid this. Both call and return lists
may contain as many or as few scalar elements as you'd like. (Often a
function without an explicit return statement is called a subroutine,
but there's really no difference from the language's perspective.)
As for that old 13 thing, here's an excerpt from the
from the Camel, regarding stat:
This function returns a 13-element list giving the statistics for
a file, either the file opened via \f(CIFILEHANDLE\fP, or named
by \f(CIEXPR\fP.
Anyway, saying
return @array;
Is a tad misleading. It either returns a list of the array's elements
if in list context, or else the number of elements in that array if in
scalar context.
Saying:
return "alpha", "beta", "gamma", "delta";
Returns that list in list context, or "delta" in scalar context.
Saying
return qw(alpha beta gamma delta);
\Ubeing mere syntactic sugar\fE for this:
return split(' ', q(alpha beta gamma delta));
returns that list in list context, but 4, split's scalar
retval, in scalar context.
--tom
--
"The reason you subscribe to a mailing list is you don't get all
the crap you get on netnews. "
--Dennis Ritchie
------------------------------
Date: Wed, 27 May 1998 12:34:20 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: list context: || vs or
Message-Id: <356B7BAC.C9A8886@spider.herston.uq.edu.au>
Tom Christiansen wrote:
snip
> Why: A list is not an array, although is many places one may be
> used for the other. An array has an AV allocated,
> whereas a list is just some values on a stack somewhere.
> You cannot alter the length of a list, for example, any
> more than you could alter a number by saying something
> like 23++. While an array contains a list, it is not
> a list itself.
>
snip
> There's something about the entire contexture of the language
> that is unclear to the general public, and I'm not sure
> what to do to clear it up.
>
The blue camel pp47-49 is quite clear on the difference between a list
and an array. It's not quite as clear on the difference between a list
and a list context. It clearly sets out what each is, but perhaps could
have more negative statements. That is, it says "I mean this" without
saying "I DON'T mean that". Given that:
You can use an array in list context;
You can assign a list to an array;
You can assign an array to a list;
You can index into both arrays and lists;
they can start to look alike.
Then you have things like the documentation for the system function
(Blue Camel p230). Saying:
system LIST
at the header, and then:
system (@args)
in the example - well, @args must be a list, right? Particularly for
people used to function prototyping in strongly typed languages, where
if you say:
func (param: sometype)
then param damn well *is* a sometype, and follows all the rules for
sometype.
So, suggestions.
1. Your paragraph "Why:" I quoted above makes things crystal clear (to
me, anyway). I wish it was on page 49 of the blue camel.
2. Change function definitions to something like:
system LIST or system @array
just to make it clear that these *are* two different things. I know,
you've already said it. I know, the two case don't actually make any
difference to the system function. My rationale is that people are
going to look at these function references *many* times more often than
they will read the preceding explanations. You can use them to score
extra points in the list vs array wars. The memory will start to
dull...
--
Jaime Metcher
------------------------------
Date: 27 May 1998 02:56:00 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: list context: || vs or
Message-Id: <6kfvc0$2e6$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Jaime Metcher <metcher@spider.herston.uq.edu.au> writes:
:system LIST or system @array
But that's not right. If it says LIST, you can use any list
expression there, including but not limited to an array -- or a hash.
Search for ARRAY in perlfunc's protos. Compare this with the LIST
occurrences.
--tom
--
echo $package has manual pages available in source form.
echo "However, you don't have nroff, so they're probably useless to you."
--Larry Wall in Configure from the perl distribution
------------------------------
Date: 26 May 1998 23:31:39 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: list context: || vs or
Message-Id: <ltg1hwjso4.fsf@asfast.com>
hex@voicenet.com (Matt Knecht) writes:
> I've noticed some odd behaviour when using || as opposed to or. The
> following script explains it better than I could:
>
> [ ... ]
>
> #@stat = stat($fname) or die "error:$!";
> @stat = stat($fname) || die "error:$!";
>
> @stat gets the value of 1 when using || (Actually, $stat[0]).
> When using 'or' @stat gets filled as per stat().
>
> As far as I understand, the only difference between || and or should
> be precedence. ||'s behavious makes even less sense after reading
> perldoc perlop. Here is the section I'm refering to:
>
> [ ... man section snipped to save bandwidth ... ]
>
> The last value evaluated should be the array returned from stat(), not
> the truth of the operation. Am I misreading perlop?
No, not at all. You appear to be interpreting perlop properly. The
"gotcha" here is that you're assuming that the `1' which is getting
returned in the `||' case is the result of the logical OR operation.
Actually, this is just the result of `stat' when interpreted in a
scalar context.
Try using `localtime(time)' instead of `stat($fname)' in your test
case, and you'll see this more clearly.
In your example, the differences in precedence between `or' and `||'
happen to cause the results of `stat' to be interpreted in a list or a
scalar context, respectively.
This is a tricky one!
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: Tue, 26 May 1998 22:14:26 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: list context: || vs or
Message-Id: <356B7702.ACCCA13B@negia.net>
Martien Verbruggen wrote:
>
> In article <FPIa1.189$_3.1145421@news2.voicenet.com>,
> hex@voicenet.com (Matt Knecht) writes:
>
> > If this is so, when do we ever see 'lists' in Perl? When stat()
> > returns it's values, aren't they given storage somewhere as an array?
> > If not, how can they survive after stat() has gone out of context?
>
> The documentation states clearly that stat returns an array. Not a list.
and the camel states just as clearly that it is a list.
pg. 224: "This function returns a 13-element list..."
i would tend to side with the camel on this one.
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: Wed, 27 May 1998 13:02:05 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Perl/Wall lingo question
Message-Id: <356B822D.C2642D6@spider.herston.uq.edu.au>
I was wondering if that version was a little tactless in this company,
but seeing as we've thrown caution to the wind...
The computer scientist says: "My numerical solution covers more ground.
Let's see - what's my password...Just booting up, guys...Access
denied?...Hang on...Damn, the sucker crashed...here we go...Out of disk
space!...Clear some junk...Version mismatch in a library file!...I'll
just recompile......."
--
Jaime Metcher
Craig Berry wrote:
>
> Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:
> : The engineer says: "Don't bother about your fancy proofs - we can see
> : empirically for all useful cases that odd numbers are prime. For
> : example, 1 is prime, 3 is prime, 5 is prime and 7 is prime".
>
> Actually, the way I heard the engineer part told is even funnier...he says
> "1 is prime, 3 is prime, 5 is prime, 7 is prime, 9 is prime, 11 is
> prime..." :)
>
> (And let's not start on why 1 *isn't* prime.)
>
> ---------------------------------------------------------------------
> | Craig Berry - cberry@cinenet.net
> --*-- Home Page: http://www.cinenet.net/users/cberry/home.html
> | Member of The HTML Writers Guild: http://www.hwg.org/
> "Every man and every woman is a star."
------------------------------
Date: Wed, 27 May 1998 03:37:07 GMT
From: WarezSpider@Warez.web/\oo/\ (/\oo/\ the original)
Subject: Re: SECURITY - simple perlscript for taking orders
Message-Id: <356e8d0d.27905563@news.sgi.net>
If you place it in a active CGI-BIN this is usually no problem as it
will inheriet the execute only writes of the folder and the "virtual"
folder won't allow downloads unless of course your the Administrator!
On Tue, 26 May 1998 23:43:13 GMT, Peter A Fein <p-fein@uchicago.edu>
wrote:
>nem@aae.com writes:
>
>> Hi All,
>>
>> I'm still getting the hang of writing in Perl, and am just looking at
>> snippets of code from available scripts. My goal is to write my own script
>> that, along with an encryption certificate, will take in credit card orders,
>> write them to a flat txt file, send an email reminder to a staff person, and
>> then generate a custom HTML for the user to know it's been received.
>>
>> I've got it up and running, but am wondering how secure it is. I started w/
>> simple mailto: routines, combined with a section that writes to the file. The
>> flat file is OUTSIDE of the w3 path, and the email reminder (that says to go
>> look at the file to process manually) does NOT contain any sensitive
>> information, such as the card type or number or exp. date.
>>
>> Any pointers? I would include the script, but it's a bit long.
>
>An important (non-perl) tip is to make sure that your script does not
>have read privleges enabled for all (ie, web) users. You'll need
>execute privileges of course, but if someone can d/l your script,
>it'll be a lot easier for them to find holes.
------------------------------
Date: Tue, 26 May 1998 18:43:48 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: string to ASCII question
Message-Id: <k3kfk6.oja.ln@localhost>
Brian (tenfoot@ddaccess.com) wrote:
: I need to convert an array of characters to its numeric ASCII value.
perldoc -f ord
: please reply via email
Nope.
Answers to the whole wide Perl community are free.
Individual attention is billed at the usual rate.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 27 May 1998 11:52:53 +0800
From: "soo" <peckss@cyberway.com.sg>
Subject: What's wrong with this??
Message-Id: <356b8e31.0@news.cyberway.com.sg>
$data->Sql("select misa, misb, count(misd) from mistable group by misa, misb
order by misb");
while ($data->FetchRow( ))
{
($misa, $misb, $misd) = $data->Data("misa", "misb", "count(misd)");
print("$misa, $misb, $misd");
}
$misa and $misb comes out okay.
BUT, $misd is not being printed. WHY???
Even if I try ($misa, $misb, $misd) = $data->Data("misa", "misb",
"misd");
$misd also doesn't come out.
AND I need to count the stupid misd for some other usage.
Any suggestions anyone.
thanks,
Susan
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 2732
**************************************