[9864] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3457 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 16 05:07:17 1998

Date: Sun, 16 Aug 98 02: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           Sun, 16 Aug 1998     Volume: 8 Number: 3457

Today's topics:
    Re: Benchmark: shift vs. multiply (Ilya Zakharevich)
        Docs for CGI.pm! powerfactor@hotmail.com
    Re: Docs for CGI.pm! (Martin Vorlaender)
    Re: eq and == difference >>Abigail -> You are a LOSER.  (Kermit the frog)
    Re: eq and == difference >>Abigail -> You are a LOSER.  (Craig Berry)
    Re: eq and == difference (Craig Berry)
    Re: eq and == difference (Kermit the frog)
    Re: eq and == difference (mikep)
    Re: here's an implementation of diff in perl (Mark-Jason Dominus)
    Re: here's an implementation of diff in perl (Ilya Zakharevich)
        How to read the compiled HTML files in HTMLHELP directo <pan@sheet-music.com>
        is there a way to prevent the dos window from closing a <mikeo@stiv.com>
    Re: is there a way to prevent the dos window from closi (Larry Rosler)
        Perl CGI Question markwb8113@my-dejanews.com
    Re: Perl CGI Question (Abigail)
        Perl/CGI Question mark@dboh.com
    Re: perl5 large integer conversion bug (Ilya Zakharevich)
    Re: Q: How to read all the file name in a directory (Abigail)
    Re: Q: How to read all the file name in a directory (Abigail)
    Re: Q: How to read all the file name in a directory (I R A Aggie)
    Re: sending variables with a hypertext link (Abigail)
    Re: sending variables with a hypertext link (Martin Vorlaender)
    Re: X-file (?=...), case postponed. (Ilya Zakharevich)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 16 Aug 1998 07:18:31 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Benchmark: shift vs. multiply
Message-Id: <6r6147$6rk$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Lloyd Zusman 
<ljz@asfast.com>],
who wrote in article <lt4svdd3wu.fsf@asfast.com>:
> A couple weeks or so ago, there was a discussion about the use of bit
> shifts as an alternative to multiplication or division by a power of
> two.  During this discussion, it was pointed out that this technique
> is a relic of the days of slow processors and non-optimizing
> compilers.

While this may be true, during discussion of Perl hashing algorithm I
found (with horror) that gcc on x86 pessimised multiplication to a sum
of shifts, and that Sparcs have no quick integer multiplication
instructions.

> At that time, I said that I'd run some benchmarks on this
> to see if bit shifts in Perl are any faster these days than the
> corresponding multiplications or divisions.  Well, I finally got
> around to doing this.
> 
> I'm using Perl 5.004_04 under RedHat Linux 5.0 on a 200 MHz Pentium
> Pro processor utilizing 128 Meg of memory.  As you can see, there is
> no significant difference in this environment between the use of bit
> shifts and multiplication/division by the corresponding power of 2:

This is not surprising.  Perl's operation dispatcher results in 200x
time overhead comparing with C code.  All the advantages of shift
vs. multiply will be hidden by this overhead.

Ilya


------------------------------

Date: Sun, 16 Aug 1998 04:59:57 GMT
From: powerfactor@hotmail.com
Subject: Docs for CGI.pm!
Message-Id: <6r5p0d$80p$1@nnrp1.dejanews.com>

Hi,
      Where can I find some documentation about the CGI.pm?

Ahmed Abbas

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: Sun, 16 Aug 1998 08:08:05 +0200
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Docs for CGI.pm!
Message-Id: <35d67745.524144494f47414741@radiogaga.harz.de>

powerfactor@hotmail.com wrote:
:       Where can I find some documentation about the CGI.pm?

In CGI.pm itself. It's formatted using a simple ASCII format named POD
(Plain Old Documentation). You can read it with any ASCII editor (search
for a line beginning with '=head'), or use the perldoc program supplied
with the standard distribution (like 'perldoc CGI').

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 OpenVMS: Where do you    | work: mv@pdv-systeme.de
 want to BE today?        |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


------------------------------

Date: Sun, 16 Aug 1998 05:28:24 GMT
From: kermit@sesamestreet.com (Kermit the frog)
Subject: Re: eq and == difference >>Abigail -> You are a LOSER. Take that stick out of your ass!
Message-Id: <35d66db3.12245744@enews.newsguy.com>

Why are you so fucking bitchy, loser??? In fact, it seems as though
3/4 of the people in this fucking group get off on slamming people
like this guy asking an innocent question. Typical snobbish behaviour
of a UNIX freak. Don't get me wrong, there are lots of civil UNIX
users out there. Shit like what this 'Abigail' character dishes out
gives UNIX people a bad name.

I agree, perhaps, that there should maybe be a
comp.lang.perl.misc.newbie group or something, but how would these
questions get answered? The users frequenting that group would be
inexperienced and may not be able to answer most, if not all of the
questions asked due to their limited knowledge of the language.

So, if it's not TOO much to ask, the next time you run across a
posting that comes from a seemingly 'rudimentary' knowledge level,
help him/her out instead of dumping your 'rough week at work' mental
baggage on them. They probably have other things to think about or
else they wouldn't be posting the question in the first place.

GROW UP, ABIGAIL! (or are you already 40 and disgruntled with your
life - sounds like it!)

Flame me all you want, or just sit back and think about it for a
second - the latter would be more constructive.

Oh, Peter, now that that is out of the way, == is a numeric
comparison, while 'eq' is alphanumeric (string). For example:

if(234==234){do this...};
if("abc" eq "abc"){do that...};

Regards,
Kermit the frog.

On 16 Aug 1998 04:48:57 GMT, abigail@fnx.com (Abigail) wrote:

>Peter Richmond (peter@richmd.demon.co.uk) wrote on MDCCCX September
>MCMXCIII in <URL: news:35D61CF1.B61DB8A4@richmd.demon.co.uk>:
>++ Hi,
>++ 
>++ Is there a difference between eq and == ?
>
>Which part of the documentation that explains 'eq' and '==' do
>you fail to understand?
>
>++ Ive noticed that in some if statements eq works but == does not.
>
>Does not work? In which sense? Does it demand more money? Is it
>sitting on the couch and watching television? Is == on the beach
>getting a suntan? 
>
>Or is it that == is doing what it is supposed to do, and you haven't
>read the documentation, nor did you turn on warnings?
>
>++ Could someone shine some light on this?
>
>*Batteries not included.
>
>
>
>Abigail



------------------------------

Date: 16 Aug 1998 07:21:41 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: eq and == difference >>Abigail -> You are a LOSER. Take that stick out of your ass!
Message-Id: <6r61a5$pms$1@marina.cinenet.net>

Kermit the frog (kermit@sesamestreet.com) wrote:
: Why are you so fucking bitchy, loser???

I find that posts which begin with obscene ad hominem attacks achieve far
less than a more reasoned response might.

: In fact, it seems as though
: 3/4 of the people in this fucking group get off on slamming people
: like this guy asking an innocent question.

That rhythmic thumping sound you hear is the beating of a dead horse. :)

Seriously, we've been through this.  Some of us (myself included) find it
rude of posters to waste the time and energy of the clpm community by
asking questions for which the answers are *by definition already on their
hard drives*.  You may judge this behavior differently; that's your right.
But if one does interpret such behavior as rudeness, a rude response seems
both justified and appropriate.

A person who cannot read documentation on his own machine has already de
facto declared himself to be of below-average intelligence.  Attempting to
reason with such a person wastes both parties' time.  Or so goes the logic
among the FAQ-asker-bashers.  It's a difficult position to refute
conclusively. 

: Typical snobbish behaviour
: of a UNIX freak. Don't get me wrong, there are lots of civil UNIX
: users out there. Shit like what this 'Abigail' character dishes out
: gives UNIX people a bad name.

God, I wish I could get everyone on clpm to read Korzybski's _Science and
Sanity_.  Your attributing snobbism to 'UNIX freaks' (despite the weak
disclaimer that follows) is just as misguided as Tom C's repeated
assertions that all Windows programmers are pathetic losers looking for a
freebie.  Let's deal with people based on their behavior, not by some
category they belong to, please.  Asking a FAQ is a behavior relevant to
clpm; programming on Windows or Unix is not (except in a technical, what-
version-are-you-using sense).

: I agree, perhaps, that there should maybe be a
: comp.lang.perl.misc.newbie group or something, but how would these
: questions get answered?

By reading the doc, without recourse to Usenet unless clarification is
required, perhaps?

: The users frequenting that group would be
: inexperienced and may not be able to answer most, if not all of the
: questions asked due to their limited knowledge of the language.

Bingo.

: So, if it's not TOO much to ask, the next time you run across a
: posting that comes from a seemingly 'rudimentary' knowledge level,
: help him/her out instead of dumping your 'rough week at work' mental
: baggage on them.

I have never once seen a poster get dumped on whose question indicated
even a basic good-faith attempt to use the docs.  *Never*.  Not once.
I've seen (and answered) some astonishingly basic questions, in which the
poster said more or less, "I'm trying X from the Llama book, and I expect
Y like it says in the book, only I'm getting Z instead" -- and the problem
is a simple typo or a misunderstood mod or whatever -- and nobody does
anything but help such posters see what they're missing, noting (for
example) that (say) the type of quotes used is important, or whatever.
Nobody ever flames such posters.

The ones who get flamed ask intensely stupid questions like "I've noticed
eq and == don't seem to be the same -- what gives?".  This is a stupid
question not because it's basic, but because *the answer is already right
there in perlop, on their hard drive.*  And yes, I do believe that anyone
who tries to use a programming language without a cursory read of the docs
(at least the Llama, or the core set of perldoc) deserves scorn and
derision -- *if they choose to compound their folly by wasting the time of
thousands of clpm readers asking for information they ALREADY HAVE.*

: They probably have other things to think about or
: else they wouldn't be posting the question in the first place.

So, they're in such a hurry that they ask on Usenet and wait hours or days
for a reply, rather than reading the doc and having an answer in two
minutes?  That's never made sense to me, even leaving aside the massive
selfishness of considering your own time precious but that of clpm readers
expendable.

: GROW UP, ABIGAIL! (or are you already 40 and disgruntled with your
: life - sounds like it!)

Ah, your rhetorical skill leaves me breathless.  I'm sure this will
convince many people to adopt your point of view.

: Flame me all you want, or just sit back and think about it for a
: second - the latter would be more constructive.

Believe me, we've thought about it.  A massive flamewar on this very topic
raged through clpm in June, I believe it was.

---------------------------------------------------------------------
   |   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: 16 Aug 1998 05:07:18 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: eq and == difference
Message-Id: <6r5pe6$jgp$1@marina.cinenet.net>

Peter Richmond (peter@richmd.demon.co.uk) wrote:
: Is there a difference between eq and == ?
: 
: Ive noticed that in some if statements eq works but == does not.
: 
: Could someone shine some light on this?

You really _really_ won't get anywhere in Perl (or in programming in
general) without becoming a habitual reader of manuals.  Programming
languages aren't like consumer appliances; you can't pick one up, push
some likely-looking buttons, and get useful results.  (You *can* learn by
reading others' code, and by experimenting with code of your own, but
doing this to grok things like comparison operators is definitely the
tough road to pick.) 

---------------------------------------------------------------------
   |   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: Sun, 16 Aug 1998 05:36:19 GMT
From: kermit@sesamestreet.com (Kermit the frog)
Subject: Re: eq and == difference
Message-Id: <35d76edb.12541585@enews.newsguy.com>

Sorry, Peter. I also meant to mention that there is an excellent book
called 'The Perl 5 programmers reference' that is like a dictionary of
Perl commands, etc, with examples and CDROM.

ISBN: 1-56604-750-1
Ventana Publishing

It's blue. :o)


------------------------------

Date: 16 Aug 1998 01:39:52 GMT
From: mikep@rt66.com (mikep)
Subject: Re: eq and == difference
Message-Id: <6r5d98$hhu$1@news.rt66.com>

In article <35D61CF1.B61DB8A4@richmd.demon.co.uk>
Peter Richmond <peter@richmd.demon.co.uk> writes:

> Is there a difference between eq and == ?
> 
> Ive noticed that in some if statements eq works but == does not.

Essentially, == works for scalars such as numbers. eq works for
strings. You can check out the docs at http://www.perl.org/ for a more
complete run down of the perl comparison operators.

===========================
Mike Powell
mikep@rt66.com
http://www.rt66.com/~mikep/


------------------------------

Date: 16 Aug 1998 02:47:38 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: here's an implementation of diff in perl
Message-Id: <6r5vaa$2nt$1@monet.op.net>


Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MDCCCX September
MCMXCIII in <URL: news:6r4lus$2as$1@mathserv.mps.ohio-state.edu>:
>++ I do not need to know the degree of
>++ difference, only the fact that the lines are different.

In article <6r5c60$5q8$2@client3.news.psi.net>,
Abigail <abigail@fnx.com> wrote:
>I fail to see how you can know two
>lines the same without somehow involving all characters.

Aren't you being obtuse here?  Obviously you can't know that they are
the same without looking at all the characters.  But you can certainly
know that they're different without looking at all the characters.



------------------------------

Date: 16 Aug 1998 07:08:30 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: here's an implementation of diff in perl
Message-Id: <6r60he$5or$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Mark-Jason Dominus
<mjd@op.net>],
who wrote in article <6r5vaa$2nt$1@monet.op.net>:
> 
> Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MDCCCX September
> MCMXCIII in <URL: news:6r4lus$2as$1@mathserv.mps.ohio-state.edu>:
> >++ I do not need to know the degree of
> >++ difference, only the fact that the lines are different.
> 
> In article <6r5c60$5q8$2@client3.news.psi.net>,
> Abigail <abigail@fnx.com> wrote:
> >I fail to see how you can know two
> >lines the same without somehow involving all characters.
> 
> Aren't you being obtuse here?  Obviously you can't know that they are
> the same without looking at all the characters.  But you can certainly
> know that they're different without looking at all the characters.

In fact Abigail has a point here.  We are talking about `diff', thus
we expect that in many cases the strings we compare will be
identical.  This means that we can forget about the logarithmic case of
different lines, it will be overshadowed by the linear case of
coinciding lines.

On the other hand, if we compare each line of the first file with each
line of the second file, then only O(n) comparisons will coincide, and
O(n^2) will be different...  And there are long common prefixes, as
the leading whitespace usually is...

Ilya


------------------------------

Date: Sun, 16 Aug 1998 07:11:06 GMT
From: "Eric Pan" <pan@sheet-music.com>
Subject: How to read the compiled HTML files in HTMLHELP directory?
Message-Id: <eCvB1.2314$4x5.1208669@newsfeed.slurp.net>

I have used ppm.pl to installed some package (eg Win32-ODBC and libnet) and
I would like to look the documentation for the packages. However, I look at
the htmlhelp directory and have no idea how to read the files. Please help
on how to read the files or where I can find the documentation for packages
as I couldn't find it in the documentation that come with ActivePerl.
Thanks.




------------------------------

Date: Sat, 15 Aug 1998 23:32:52 -0700
From: "Mike Ostenberg" <mikeo@stiv.com>
Subject: is there a way to prevent the dos window from closing after running a perl program in win32?
Message-Id: <6r5uql$hg6$1@pollux.dnai.com>

Hi all,
forgive my newbie question but I'm running perl under win95.  When I run my
programs it pops up a dos window (aaarrgghh... I thought we were past that
dos shtufff!!) that prints out the results of my program, and then the
window immediately disappears.  I've been putting a "$input = <STDIN>;" line
at the bottom of all my PERL programs to "trap" the window open until I can
read the input, but this only works when the program makes it to the last
line successfully.  If I have an error, it just pops up a quick listing and
then the window immediately disappears.  Being as I flunked out of Evelyn
Woods Super Speed Reading Classes, I don't have a way to see what the error
messages are.

Is there a way to prevent the dos window from automatically closing after
running a perl program?

thanks in advance,

Mike





------------------------------

Date: Sat, 15 Aug 1998 23:56:31 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: is there a way to prevent the dos window from closing after running a perl program in win32?
Message-Id: <MPG.1040227d245c63689897cf@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <6r5uql$hg6$1@pollux.dnai.com> on Sat, 15 Aug 1998 23:32:52 -
0700, Mike Ostenberg <mikeo@stiv.com> says...
 ... 
> Is there a way to prevent the dos window from automatically closing after
> running a perl program?

Try running the program from the command line in a DOS window.  It should 
display the output and return to another command prompt.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Sun, 16 Aug 1998 05:24:55 GMT
From: markwb8113@my-dejanews.com
Subject: Perl CGI Question
Message-Id: <6r5qf6$9mv$1@nnrp1.dejanews.com>

I have just recently started to write perl/cgi scripts, so please excuse my
ignorance. I am looking for a technique that would allow me to pass an entire
associative array from one cgi script to another. I am using the &ReadParse
subroutines from "cgi-lib.pl" to parse my form variables, but not quit sure
how I would subit an array to this routine.

I have a perl/cgi script that reads an inventory file into a two dimensional
associative array. Using that array, I generate an inventory-item/checklist
web- form. Based on user input (via the web-form), secondary scripts are then
executed. I would like to pass the inventory data that has already been read
into my 2-d array from one script to the next. I could just re-read the
inventory file over and over again in each subsequent script, but I thought
it would more efficient to re-use the array once it had been loaded
originally. Any ideas, comments or suggestions, would be greatly appreciated.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: 16 Aug 1998 08:18:00 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl CGI Question
Message-Id: <6r64jo$c5d$1@client3.news.psi.net>

markwb8113@my-dejanews.com (markwb8113@my-dejanews.com) wrote on MDCCCXI
September MCMXCIII in <URL: news:6r5qf6$9mv$1@nnrp1.dejanews.com>:
++ I have just recently started to write perl/cgi scripts, so please excuse my
++ ignorance. I am looking for a technique that would allow me to pass an entire
++ associative array from one cgi script to another. I am using the &ReadParse
++ subroutines from "cgi-lib.pl" to parse my form variables, but not quit sure
++ how I would subit an array to this routine.

You shouldn't use cgi-lib.pl. Unless the rest of your environment is as
ancient. Perhaps you're running SunOS 1.3, NSCA server 0.8 and your
pages are optimized for the Viola browser? In such a historical setting,
cgi-lib fits. Otherwise, you should use CGI.pm.

++ I have a perl/cgi script that reads an inventory file into a two dimensional
++ associative array. Using that array, I generate an inventory-item/checklist
++ web- form. Based on user input (via the web-form), secondary scripts are then
++ executed. I would like to pass the inventory data that has already been read
++ into my 2-d array from one script to the next. I could just re-read the
++ inventory file over and over again in each subsequent script, but I thought
++ it would more efficient to re-use the array once it had been loaded
++ originally. Any ideas, comments or suggestions, would be greatly appreciated.


What makes you think it's more efficient to encode the hash into a string,
send it to the client over the network, get it back over the same network,
and then decode it instead of re-reading your file?

Note that this gives your answer as well. You have your file, that contains
all the information to contruct your hash. Send the content as that
file as a parameter and read it back in.



Abigail
-- 
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'


------------------------------

Date: Sun, 16 Aug 1998 05:49:09 GMT
From: mark@dboh.com
Subject: Perl/CGI Question
Message-Id: <6r5rsl$b69$1@nnrp1.dejanews.com>

I am just starting to write perl/cgi applications, so please excuse my
ignorance. I have a perl/cgi script that reads a data file into a 2-d
associative array, and then generates an inventory-item/checklist web-form
based on the information just read in. As the user submits this form,
subsequent scripts are run that need access to the same information that was
stored in the 2-d array created in the original script. I am looking for a
method to submit the contents of this array to the subsequent forms/scripts.

I am using the &ReadParse subroutine found in the "cgi-lib.pl" library for
parsing form information, but not sure how pass an entire array via a
web-form. I could just re-read the data file over and over again in each
subsequent script, but I was looking for a more efficient method. Any ideas
or suggestions would be greatly appreciated.

Thanks,
Mark Brennan
mark@dboh.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: 16 Aug 1998 07:12:34 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl5 large integer conversion bug
Message-Id: <6r60p2$6ce$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Tom Christiansen 
<tchrist@mox.perl.com>],
who wrote in article <6r5c00$8b2$1@csnews.cs.colorado.edu>:
>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
> :Oh, stop this, Tom!  People expect that Perl numbers behave as, well,
> :numbers.  
> 
> Bit patterns are not numbers.

You will find that this is debatable.  | and & are well-defined
operations on "natural" numbers, ~ and ^ are not.

> What's 2 & 3.4?  What's -1 | 1?  What's O_RDWR|O_CREAT?

This is irrelevant to the situation in question, when doing one
well-defined operation (with positive integers) pollutes the following
operation.

Ilya


------------------------------

Date: 16 Aug 1998 05:01:46 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <6r5p3q$au2$2@client3.news.psi.net>

Michael J Gebis (gebis@fee.ecn.purdue.edu) wrote on MDCCCXI September
MCMXCIII in <URL: news:6r5ald$lmr@mozo.cc.purdue.edu>:
++ fl_aggie@thepentagon.com (I R A Aggie) writes:
++ }Patting a kid on the head is nice, but that' don't teach him how to ride
++ }a bike...
++ 
++ Let me guess.  You learned to ride a bike by consulting the
++ documentation.  


That sure beats asking in 'rec.cycling'
"I just bought a bike. What do I do next?".



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


------------------------------

Date: 16 Aug 1998 05:16:43 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <6r5pvr$b4i$1@client3.news.psi.net>

Michael J Gebis (gebis@fee.ecn.purdue.edu) wrote on MDCCCXI September
MCMXCIII in <URL: news:6r5ald$lmr@mozo.cc.purdue.edu>:
++ fl_aggie@thepentagon.com (I R A Aggie) writes:
++ }Patting a kid on the head is nice, but that' don't teach him how to ride
++ }a bike...
++ 
++ Let me guess.  You learned to ride a bike by consulting the
++ documentation.  


That sure beats asking in 'rec.cycling'
"I just bought a bike. What do I do next?".



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


------------------------------

Date: Sat, 15 Aug 1998 20:53:39 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <fl_aggie-1508982053390001@aggie.coaps.fsu.edu>

In article <35D5958F.7AC9@iowegian.com>, grant.griffin@iowegian.com wrote:

+ For example, I just bought a new car.  Do I want
+ to read the manual?  No.  Did I have to?  Yes.  The people who designed
+ the car screwed up.

No. A car is a complex system, and has many features you may not be
familiar with. Anti-lock brakes, for instance. Unless told, most people
will not be able to tell you, for sure, how its done. Writing things down
is an old and honored tradition of passing information, knowledge and
ideas.

+ As a general principle, I would like to see things brought _down_ from
+ The Mountain, rather than pushed _up_ it!

You mean like the _Ten Commandments_? I'd call the documentation. And it
was/is discussed, argued over, fought about, contemplated and lived by.

And yet, for all of that, it still is a good idea for the end-user to
read it.

James


------------------------------

Date: 16 Aug 1998 07:32:27 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: sending variables with a hypertext link
Message-Id: <6r61ub$c18$1@client3.news.psi.net>

Daniel Adams (dan@fearsome.net) wrote on MDCCCXI September MCMXCIII in
<URL: news:903238708.27193.0.nnrp-07.c2deb1c5@news.demon.co.uk>:
++ I need to call a perl script from within an html document. Normally, of
++ course, you would make a simple html link such as <a
++ href="foobar.cgi">click</a>.
++ 
++ However, I need to send some variables to the script when the hypertext link
++ is clicked. Is this possible? How do I do this?

Yes. And you do it in the same way as for a Cobol or Simula '67 program.

++ My only thought is that there is some way of attaching variables at the end
++ of the filename, as you see in search engine scripts - i.e.
++ yahoo.com/search.cgi?XXX_XXX

Do I see the three magic letters 'cgi' there? Using '?XXX_XXX' is one
way, but I can images thousands of other ways.

++ If this is the right way to go about things, I would very much appreciate
++ somebody suggesting a link to a source of further information so that I can
++ learn about this. I have tried dejanews, altavista, the myriad of perlFAQ's
++ and even the (IMHO) unbearable man pages, but I can't find what I'm looking
++ for, mainly because I don't know what it is.

You are looking for 'cgi'. Find documentation about 'cgi'. Find the
groups about 'cgi'. There is no 'cgi' in 'comp.lang.perl.misc'.

++ Any pointers welcome, but the URL of a webpage on this whole topic would be
++ especially welcome. Of course, if I am completely off track, notice of that
++ fact will be equally welcome ;-)


Here's an URL: <news:news.announce.newusers>



Abigail
-- 
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT


------------------------------

Date: Sun, 16 Aug 1998 08:33:12 +0200
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: sending variables with a hypertext link
Message-Id: <35d67d28.524144494f47414741@radiogaga.harz.de>

Daniel Adams (dan@fearsome.net) wrote:
: I need to call a perl script from within an html document. Normally, of
: course, you would make a simple html link such as <a
: href="foobar.cgi">click</a>.
:
: However, I need to send some variables to the script when the hypertext link
: is clicked. Is this possible? How do I do this?
[...]
: Any pointers welcome, but the URL of a webpage on this whole topic would be
: especially welcome. Of course, if I am completely off track, notice of that
: fact will be equally welcome ;-)

OK. You're completely off track. This is a not a Perl question. You had better
asked it in comp.infosystems.www.authoring.cgi .

cu,
  Martin

P.S.: The CGI specification can be found at
      http://hoohoo.ncsa.uiuc.edu/cgi/overview.html
      Look at the page about "handling the output output of HTML forms",
      in a section named "Form Submission", and note that <a href> generates
      a GET request.
--
                          | Martin Vorlaender | VMS & WNT programmer
 OpenVMS: Where do you    | work: mv@pdv-systeme.de
 want to BE today?        |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


------------------------------

Date: 14 Aug 1998 18:04:17 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: X-file (?=...), case postponed.
Message-Id: <6r1u71$pt4$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Ronald J Kimball
<rjk@coos.dartmouth.edu>],
> > $_ = "boink";
> > /(.*)(oink)/;
> 
> $1 and family are only set when a match is successful.  Thus, the phrase
> "what is in $1 before you evaluate what is in $2" is meaningless.

Why with the current implementation it is true, this is just a
coincidence.  I hope that soon the situation will be the opposite, so
$1 and $2 work in (?{ code }).

> Regexes are evaluatehe user point of view this is
true.  But this is not necessarily how the things are done by Perl.

Say, with 
     /(foo)(.*)(barbaz)/
barbaz will be found first, then foo.

In fact barbaz will be found without even *entering* RE engine.

Ilya


------------------------------

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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 3457
**************************************

home help back first fref pref prev next nref lref last post