[boulder.pm] unsubscribe

Keanan Smith KSmith at netLibrary.com
Thu Jun 27 16:44:50 CDT 2002


Muhuhahaha! Scott is trying to escape! Little does he know that you can
never unsubscribe from the evil
boulder Perl-Mongers list (Well, at least not without sending E-mail to
majordomo *grin*)

(Let's fill up his inbox with useless perl stuff! quick everyone! I'll
start...

Hey, This is an oddity:

Of these two code fragments:

   @{$me->{arrayrep}} = split(/(?=$me->{break})/,$value); 
   my $mypos = 0;
   foreach $line (@{$me->{arrayrep}})
   {
     $mypos += length($line);
     ... do stuff ...
   }

and

    while ($value =~ /$me->{break}/g)
    {
      my $mypos = pos($value);
      $me->{arrayrep}->[$i] = $1;
      $i++;
      ... do stuff ...
    }

I would think that the first (Which calls the 'split' builtin to generate
the array)
would be faster than the second (Which repeatedly does a regular expression
and assigns the list elements by hand)

But in fact it's the reverse! Weird eh?
Anyone have a good explination for why?


-----Original Message-----
From: Scott Liddick [mailto:wilddogz at ureach.com]
Sent: Thursday, June 27, 2002 12:55 PM
To: Jessee Porter
Subject: [boulder.pm] unsubscribe


unsubscribe




________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag


---- On Fri, 21 Jun 2002, Jessee Porter (porterje at us.ibm.com) wrote:

> 
> Along with many of my coworkers, I'm getting sacked on next friday...
> Anyone looking for a reasonably experienced perl programmer?
> regards,
>         Jesse Porter
> --
>    As we enjoy great advantages from inventions of others, we
>    should be glad of an opportunity to serve others by any
>    invention of ours; and this we should do freely and generously.
>       -- Benjamin Franklin
> 
> 
> 
> 



More information about the Boulder-pm mailing list