[9787] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3381 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 6 17:06:48 1998

Date: Thu, 6 Aug 98 14:01:32 -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           Thu, 6 Aug 1998     Volume: 8 Number: 3381

Today's topics:
        Perl course <ralba@distorted.net>
    Re: Perl course (brian d foy)
    Re: Perl course <matt@pcr7.pcr.com>
    Re: Perl Docs.. forget the original post (Gary L. Burnore)
    Re: Perl Docs.. forget the original post <boys@aspentech.com>
    Re: PERLDOC for Win32 ?? dturley@pobox.com
        PerlScript Setup, IIS4 David@iqtexas.com
        problem writing to a new file <gferris@chaph.usc.edu>
        re first language <ralba@distorted.net>
        READS LOCATION WINDOW & POINTS TO NEW URL <cbell@interlog.com>
        there is a way if you have a linux or unix system <look@this.hak>
    Re: Variable Length & Memory? (Ilya Zakharevich)
        warnings <bjlockie@nortel.ca>
        What is PERL_OBJECT? arndt@ais-gmbh.de
    Re: What's the future of Perl? (Ilya Zakharevich)
    Re: wtf is the obsession with "foo" and "bar" (Martin Vorlaender)
    Re: X-file (?=...), case postponed. (Ilya Zakharevich)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 06 Aug 1998 16:06:23 -0500
From: ray <ralba@distorted.net>
Subject: Perl course
Message-Id: <35CA1ACC.123B61E4@distorted.net>

Does anyone of you konw where on could take Perl courses in NYC?
Preferably in Manhattan.  I have read through Learning Perl, and CGI
programming by Orielly . The books really helped me out plenty, however,
I still have plenty of questions and think that some instruction may do
me good.  let me know,

Ray
Perl Newbie not Perl Virgin



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

Date: Thu, 06 Aug 1998 16:26:41 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl course
Message-Id: <comdog-ya02408000R0608981626410001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35CA1ACC.123B61E4@distorted.net>, ralba@distorted.net posted:

>Does anyone of you konw where on could take Perl courses in NYC?
>Preferably in Manhattan.  I have read through Learning Perl, and CGI
>programming by Orielly . The books really helped me out plenty, however,
>I still have plenty of questions and think that some instruction may do
>me good.  let me know,

i'm working on it ;)  NYU offers a semester long beginning Perl 
course through their extension program, too.

until then, check out the New York Perl Mongers - 
<URL:http://ny.pm.org>, which might have a free mini-class RSN. :)

-- 
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 Travel Deals! <URL:http://www.pm.org/travel.html>


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

Date: 6 Aug 1998 20:34:06 GMT
From: "Matt Heusser" <matt@pcr7.pcr.com>
Subject: Re: Perl course
Message-Id: <01bdc179$6875dc00$47eb1bcc@XSTA71.pcr.com>

>Does anyone of you konw where on could 
>take Perl courses in NYC?

  I know O'reilly & Associates offer on-line
courses:

http://training.oreilly.com/

 For about $200 each.  When you graduate, you get a 
certificate.

   Hey, does that make you O'Reilly Certified?
   

regards,

Matt H.



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

Date: Thu, 06 Aug 1998 19:07:24 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Perl Docs.. forget the original post
Message-Id: <35cbfeaf.229829849@nntpd.databasix.com>

On Thu, 06 Aug 1998 13:49:54 -0400, in article <35C9ECC2.288E@min.net>, John
Porter <jdporter@min.net> wrote:

>Gary L. Burnore wrote:
>> 
>> On Thu, 06 Aug 1998 09:50:43 -0400, in article <35C9B4B3.37E6@min.net>, John
>> Porter <jdporter@min.net> wrote:
>> 
>> >no.unsoliciteds@dead.end.com wrote:
>> >>
>> >> All I can say is this - if the gurus had had bad tempered, ecclectic, obtuse
>> >> and sometimes downright abusive lecturers with bad communication skills
>> >> perhaps they would have a different attitude now.
>> >
>> >The implication is that the "gurus" have, as a result, bad communication
>> >skills.  But just you can't (or won't) read doesn't mean they can't
>> >write.
>> >Your disparagement is very unjustified, and is very insulting.
>> >What have *you* done for the Perl community?
>> 
>> You're again suggesting that because someone has done something for the Perl
>> community they have a right to be rude.
>
>No, actually we weren't talking about rudeness.
>We were talking about how well the docs are written, and the
>alleged indifference of the doc writers.
>Rudeness was introduced as a rider rather late in the thread.

In which case it's still wrong to suggest that listning to someone's opinion
should be based on what they've "done for the Perl community"
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups.          |     Official Proof of Purchase
===========================================================================


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

Date: Thu, 06 Aug 1998 20:46:23 +0100
From: Ian Boys <boys@aspentech.com>
Subject: Re: Perl Docs.. forget the original post
Message-Id: <35CA080F.59E2@aspentech.com>

no.unsoliciteds@dead.end.com wrote:
> 
> All I can say is this - if the gurus had had bad tempered, ecclectic, obtuse
> and sometimes downright abusive lecturers with bad communication skills
> perhaps they would have a different attitude now. They don't care, you're
> right, but if they don't then why are they writing documentation that is
> supposed to expalain something. If I keep speaking at you in Chinese you're
> going to learn something after a while (not)- Well the QURGE function is just
> like the  C QURGE. Great, so do I have to learn C just so I can understand
> what the function does? Or UNIX, or AWK, or SED, or SHELL? Don't get me wrong
> I dislike people who try to get me to think for them just as much as the next
> user, but these references are just as lazy, because they make me think for
> whoever wrote it, because they couldn't be bothered finding a better way of
> saying it.

I really don't buy this. I have learnt Perl from the docs that come 
with the distribution and I have found them a really excellent 
reference. I don't own, and have barely ever glanced at, a Perl book.
Granted, there doesn't seem to be a gentle introduction to what Perl
is all about--there is no "way in" from the very beginning. But for
me this was challenge to be relished, like solving a puzzle. I always
had the option of buying a book if I wanted to.

Perhaps if the docs you are reading seem like Chinese to you, you are
trying to rush ahead too fast and you need to slow down. Practice some
more with the things you do understand, do some background reading, be
patient. 

If you go to college, you expect to spend years learning complex 
subject matter; no one expects a book to exist that explains things so 
well you can just read it instead of doing the learning. Well, 
programming and algorithms and interaction with operating systems 
are not simple, despite appearances. And Perl will give you a big wide
door into those areas if you wish. Documentation cannot exist that 
will make everything easy to understand just by reading it. Sorry.

Ian


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

Date: Thu, 06 Aug 1998 19:12:58 GMT
From: dturley@pobox.com
Subject: Re: PERLDOC for Win32 ??
Message-Id: <6qcv7p$c8p$1@nnrp1.dejanews.com>

In article <35C81B5A.A504ACC6@chesco.com>,
  maierc@chesco.com wrote:
> Is there no perdoc executable for the Win32 port of Perl??

Get the GS binary dist:

http://www.perl.com/CPAN-local/ports/win32/Standard/x86/perl5.00402-bindist04-bc
 .tar.gz

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


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

Date: Thu, 06 Aug 1998 19:54:22 GMT
From: David@iqtexas.com
Subject: PerlScript Setup, IIS4
Message-Id: <6qd1le$g61$1@nnrp1.dejanews.com>

I installed the new ActivePerl 5.005.
I created a virtual directory to the aspexample directory that was instaled.

I then called hello.asp

The following was returned:
<html>16389 (0x00004005)</body></html>

Looks like a bad hash.
It appears I need to do something else to get this to work.
Note: The hello.asp is error free.

Any help is appreciated.

-David

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


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

Date: Thu, 6 Aug 1998 13:34:52 -0700
From: "Greg Ferris" <gferris@chaph.usc.edu>
Subject: problem writing to a new file
Message-Id: <6qd4r5$9e1$1@usc.edu>

Hello,
    I am a beginner in Perl programming.  I have written a script that I am
going to use to sign up users on my website.  The HTML page has a form which
prompts the user for a desired username, known as "check" in the script.  I
am using cgi-lib.pl in this script as well.  I am having a problem near the
end of the script.  If the user requests a username that is not taken, I
want to write to a new text file using that requested username as the title.
I will later store their personal info in their own personal text file.  For
some reason, I can't figure out what I am doing wrong, because the text file
simply isn't being created.  Does anyone see any obvious flaws with my use
of Perl to accomplish this task?  Once again, I am a beginner and am
expecting my mistake to be pretty simple.  Thank you very much.

Greg Ferris



#!/usr/bin/perl

require "cgi-lib.pl"

&ReadParse(%in);

open(FILE, $in{file}) or
  die "content-type: text/html\n\nNo file: $in{file}.\n";
@data = <FILE>;
close FILE;

#make username check all lower case
$in{check}=~ tr/A-Z/a-z/;
@result = grep /^$in{check}$/, @data;

#if there's a match, send to the "name already taken" page
#if there's no match, create a new text file with the username as a title
#  and then send to the "name is available" page
  if ( scalar @result ) {
  print "location: $in{fail}\n\n";
  }
else {
  open(USER, ">$in{check}";
     {print USER "$in{check}"\n"};
  close(USER);
  {print "location: $in{success}\n\n";
  }
}





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

Date: Thu, 06 Aug 1998 16:48:50 -0500
From: ray <ralba@distorted.net>
Subject: re first language
Message-Id: <35CA24BF.ABB78190@distorted.net>

My first language was basic about 10 years ago.  After coding for a
couple of years in that language I decided that perhaps programming was
not for me.   I completely dropped the idea of programming until about
three years ago when the Internet came about. Now I am trying
desperately to understand Perl. For the most part it reads simple,
however, I sometimes find it difficult to get what I want from it due to
my lack of programming experience.  And since I am self teaching myself,
I have no one to correct my mistakes.

Do you think at this stage of the game, that I should perhaps
investigate learning assembly to assist with my understanding of Perl, C
and other languages?

Also, I would like to mention, that if I could be a cook, I would be
very happy.

Ray



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

Date: Thu, 06 Aug 1998 15:49:05 +0000
From: Chris Bell <cbell@interlog.com>
Subject: READS LOCATION WINDOW & POINTS TO NEW URL
Message-Id: <35C9D052.38CB@interlog.com>

Question: Is is possible to read the location window in Netscape and IE
and point to new URL. THis is for a site with multiple domain names. We
want a diferent home page to come up for each domain name.

Regards,

Chris Bell


-- 
============================
ASM CONSULTING GROUP
2255 B Queen Street East, Suite 803
Toronto, Ontario, M4E 1G3

Tel: (416) 698-5763
Fax: (416) 686-1100
mail to:cbell@the-beaches.com
=============================


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

Date: Thu, 06 Aug 1998 14:26:07 -0600
From: Stephen D Gagliardi <look@this.hak>
Subject: there is a way if you have a linux or unix system
Message-Id: <35CA115E.AE0F3E22@this.hak>

is you are using a hot mail account you can use an all text browser to
submit the information..
and then copy all your mail.. or there are also ways to access your
current mail info..

here is a script i wrote that tells me if i have new mail or not at the
command prompt.. if you know perl
you should be able to follow it pretty well if not sorry.. . . .

if you want this script mail me at nommer@rocketmail.com




end of line.  . . ..



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

Date: 6 Aug 1998 20:55:19 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Variable Length & Memory?
Message-Id: <6qd57n$86p$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Andrew M. Langmead
<aml@world.std.com>],
who wrote in article <Ex9v1C.48G@world.std.com>:
> "Adam Graham-Yooll" <agy@macgreg.com> writes:
> 
> >When a script is compiled all the variable names are turned into memory
> >addresses.  So there is no difference in the executable size or speed.
> 
> In perl, package variables are stored in a symbol table, which is just
> like a hash. So those variable names still has to be around at run
> time.

I would say that you create an unnecessary confusion.  Lexical
variable names are also stored and remembered at run time.  Witness
`eval'. 

> But I agree with others that the differences in length in variables
> names is not going to have any noticable affect on the memory
> footprint of a program.

But only because the memory footprint of a typical Perl program is
humungous anyway.  :-(

Ilya


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

Date: Thu, 06 Aug 1998 15:35:54 -0400
From: Bob Lockie <bjlockie@nortel.ca>
Subject: warnings
Message-Id: <35CA059A.DCEA223A@nortel.ca>

I get the warning when I run something from perl4 (unix) on
Perl5 (intel) "Use of uninitialized value at CGI.pkg line 374.".

Without changing the unix built code how can I make the warnings go
away (I think they are screwing up my web server)?


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

Date: Thu, 06 Aug 1998 20:00:03 GMT
From: arndt@ais-gmbh.de
Subject: What is PERL_OBJECT?
Message-Id: <6qd203$h32$1@nnrp1.dejanews.com>

While browsing through comp.lang.perl.* I saw PERL_OBJECT
mentioned multiple times. It is obviously a build option
for perl which was introduced by ActiveState.

README.win32 in the perl5.005_01 distribution says:

    Beginning with version 5.005, there is experimental
    support for building a perl interpreter that supports
    the Perl Object abstraction (courtesy ActiveState Tool
    Corp.)  PERL_OBJECT uses C++, and the binaries are
    therefore incompatible with the regular C build.

This doesn't give me a clue. What is it for? Do I want it?

Thank you,
Arndt

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


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

Date: 6 Aug 1998 20:42:52 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: What's the future of Perl?
Message-Id: <6qd4gc$6s5$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Andrew M. Langmead
<aml@world.std.com>],
who wrote in article <ExA0w7.LAJ@world.std.com>:
> >No.  The memory image of the script is constructed during runtime, not
> >during compile time.  I have no idea why, but maybe C compilers are
> >not able to construct a typical graph with 100K nodes in read-only
> >memory.
> 
> Even though the C output of the perl compiler does put its
> pre-computed data in the initialized data area, (as opposed to a
> constant initialized data area) and it does modify that data, that
> doesn't mean that it can't be shared between processes. If an OS
> combines demand paging with copy on write, it could make the
> initialized data area shared until written to.

Thus until script actualy starts - do not think one would notice
sharing which happens in the first millisecond ;-).

> (In which it would then
> copy the page and then write to its private un-shared copy) And the
> perl_init function created by the compiler doesn't seem to touch _all_
> of the initialized data that the compiler creates.

This was not my impression.  What I saw looked like most of it was
touched.  And not that if even 0.3% of data is touched, this means
that 99.9% (99% ?) of pages will be touched.

> >> But then you have to weigh in other factors. If you build perl to use
> >> a shared library for the interpreter, you then get more memory shared
> >> between simultaneous invocations of different perl programs.
> 
> >Executables are shared too, thus this argument is void.
> 
> Here I was talking about a shared perl library for compiled
> scripts. 

And I was talking about comparin gthis situation to running
*uncompiled* scripts. 

Ilya


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

Date: Thu, 06 Aug 1998 20:14:30 +0200
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <35c9f286.524144494f47414741@radiogaga.harz.de>

Kim Saunders (kims@tip.net.au) wrote:
: Why are "foo" and "bar" ALWAYS used as example names in anything unix
: related, and partularly perl? What is the origin? What do they mean? (foo i
: can handle). Why aren't people more imaginative when they do stuff, and use
: their own things? It's rather irritating sometimes.

The Jargon file has to say the following about "foo":

foo: /foo/  1. /interj./ Term of disgust.  2. Used very
   generally as a sample name for absolutely anything, esp. programs
   and files (esp. scratch files).  3. First on the standard list of
   metasyntactic variables used in syntax examples.  See also
   bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh,
   xyzzy, thud.

   The etymology of hackish `foo' is obscure.  When used in
   connection with `bar' it is generally traced to the WWII-era Army
   slang acronym FUBAR (`Fucked Up Beyond All Repair'), later
   bowdlerized to foobar.  (See also FUBAR.)

   However, the use of the word `foo' itself has more complicated
   antecedents, including a long history in comic strips and cartoons.
   The old "Smokey Stover" comic strips by Bill Holman often
   included the word `FOO', in particular on license plates of cars;
   allegedly, `FOO' and `BAR' also occurred in Walt Kelly's
   "Pogo" strips.  In the 1938 cartoon "The Daffy Doc", a very
   early version of Daffy Duck holds up a sign saying "SILENCE IS
   FOO!"; oddly, this seems to refer to some approving or positive
   affirmative use of foo.  It has been suggested that this might be
   related to the Chinese word `fu' (sometimes transliterated
   `foo'), which can mean "happiness" when spoken with the proper
   tone (the lion-dog guardians flanking the steps of many Chinese
   restaurants are properly called "fu dogs").

   Paul Dickson's excellent book "Words" (Dell, 1982, ISBN
   0-440-52260-7) traces "Foo" to an unspecified British naval
   magazine in 1946, quoting as follows: "Mr. Foo is a mysterious
   Second World War product, gifted with bitter omniscience and
   sarcasm."

   Other sources confirm that `FOO' was a semi-legendary subject of
   WWII British-army graffiti more-or-less equivalent to the American
   Kilroy.  Where British troops went, the graffito "FOO was here"
   or something similar showed up.  Several slang dictionaries aver
   that FOO probably came from Forward Observation Officer.  In this
   connection, the later American military slang `foo fighters' is
   interesting; at least as far back as the 1950s, radar operators
   used it for the kind of mysterious or spurious trace that would
   later be called a UFO (the older term resurfaced in popular
   American usage in 1995 via the name of one of the better
   grunge-rock bands).

   Earlier versions of this entry suggested the possibility that
   hacker usage actually sprang from "FOO, Lampoons and Parody",
   the title of a comic book first issued in September 1958, a joint
   project of Charles and Robert Crumb.  Though Robert Crumb (then in
   his mid-teens) later became one of the most important and
   influential artists in underground comics, this venture was hardly
   a success; indeed, the brothers later burned most of the existing
   copies in disgust.  The title FOO was featured in large letters on
   the front cover.  However, very few copies of this comic actually
   circulated, and students of Crumb's `oeuvre' have established
   that this title was a reference to the earlier Smokey Stover
   comics.

   An old-time member reports that in the 1959 "Dictionary of the
   TMRC Language", compiled at TMRC, there was an entry that went
   something like this:

     FOO: The first syllable of the sacred chant phrase "FOO MANE
     PADME HUM."  Our first obligation is to keep the foo counters
     turning.

   For more about the legendary foo counters, see TMRC.  Almost
   the entire staff of what later became the MIT AI Lab was involved
   with TMRC, and probably picked the word up there.

   Very probably, hackish `foo' had no single origin and derives
   through all these channels from Yiddish `feh' and/or English
   `fooey'.

metasyntactic variable: /n./  A name used in examples and
   understood to stand for whatever thing is under discussion, or any
   random member of a class of things under discussion.  The word
   foo is the canonical example.  To avoid confusion,
   hackers never (well, hardly ever) use `foo' or other words like
   it as permanent names for anything.  In filenames, a common
   convention is that any filename beginning with a
   metasyntactic-variable name is a scratch file that may be
   deleted at any time.

   To some extent, the list of one's preferred metasyntactic variables
   is a cultural signature.  They occur both in series (used for
   related groups of variables or objects) and as singletons.  Here
   are a few common signatures:

     foo, bar, baz, quux, quuux, quuuux...:
          MIT/Stanford usage, now found everywhere (thanks largely to
          early versions of this lexicon!).  At MIT (but not at
          Stanford), baz dropped out of use for a while in the 1970s
          and '80s. A common recent mutation of this sequence inserts
          qux before quux.
     bazola, ztesch:
          Stanford (from mid-'70s on).
     foo, bar, thud, grunt:
          This series was popular at CMU.  Other CMU-associated
          variables include gorp.
     foo, bar, fum:
          This series is reported to be common at XEROX PARC.
     fred, barney:
          See the entry for fred.  These tend to be Britishisms.
     corge, grault, flarp:
          Popular at Rutgers University and among GOSMACS hackers.
     zxc, spqr, wombat:
          Cambridge University (England).
     shme
          Berkeley, GeoWorks, Ingres.  Pronounced /shme/ with a short
          /e/.
     snork
          Brown University, early 1970s.
     foo, bar, zot
          Helsinki University of Technology, Finland.
     blarg, wibble
          New Zealand.
     toto, titi, tata, tutu
          France.
     pippo, pluto, paperino
          Italy.  Pippo /pee'po/ and Paperino /pa-per-ee'-no/ are the
          Italian names for Goofy and Donald Duck.
     aap, noot, mies
          The Netherlands.  These are the first words a child used to
          learn to spell on a Dutch spelling board.

   Of all these, only `foo' and `bar' are universal (and baz
   nearly so).  The compounds foobar and `foobaz' also enjoy
   very wide currency.

   Some jargon terms are also used as metasyntactic names; barf
   and mumble, for example.  See also Commonwealth Hackish
   for discussion of numerous metasyntactic variables found in Great
   Britain and the Commonwealth.
</QUOTE>

Does that answer your question?
As you see, only foo and bar are useable internationally.

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: 6 Aug 1998 20:33:48 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: X-file (?=...), case postponed.
Message-Id: <6qd3vc$5n2$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Patrick Timmins
<ptimmins@netserv.unmc.edu>],
who wrote in article <6qcs7d$7d3$1@nnrp1.dejanews.com>:
> In regard to Abigail's sig:
> 
> @arr =  split /(.*)/s , "Just another Perl Hacker\n";
> for (@arr) { print "elem:$_"; }
> 
> In article <6qce90$1pg$2@client3.news.psi.net>,
>   abigail@fnx.com wrote:
> [snip]
> > Well, yes, .* means zero or more non-newline characters. But, IMO,
> > .* isn't (?=(.*)).
> >
> > Abigail
> [snip]
> 
> Because with /(.*)/s, $& = .*, while with /(?=(.*))/s $& is always empty, so
> the regex engine just keeps moving along because, in it's opinion, it hasn't
> matched anything yet, because there is nothing in $& ? Is this right?
> 
> So it is the (.*) filling the array, but the regex engine doesn't stop (as it
> normally would) because the (?= .. ) construct is making sure $& stays empty.
> So where ever the regex engine is at, the split splits and puts the character
> it is at in @arr and then whatever is left to the end of the "Just Another
> Perl Hacker\n" expression in @arr as well.

You are mixing two things: RE engine, and Perl.  Until *very*
recently, Perl did not know anyting about RE engine, and RE engine
knew nothing about Perl.

Perl was providing RE engine a string and a pattern, and RE engine was
returning Perl the results of the match, none of them knowing how the
other is using the provided info.

So: It is *split* who calls RE engine in a loop, making the frog
restart at the place it finished the last time.

[ Do not ask why with /(?=.*)/ the frog restarts at the same place as
  the previous time, but returns a different result - it is a smart
  frog. ]

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

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