[16767] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4179 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 30 18:05:55 2000

Date: Wed, 30 Aug 2000 15:05:26 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967673126-v9-i4179@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 30 Aug 2000     Volume: 9 Number: 4179

Today's topics:
    Re: Any chance of a little more explanation? <lr@hpl.hp.com>
    Re: Bulk add to a hash.. Thanks for the help! alphazerozero@my-deja.com
    Re: Bulk add to a hash.. Thanks for the help! (brian d foy)
    Re: Bulk add to a hash.. Thanks for the help! (Jakob Schmidt)
    Re: Bulk add to a hash.. Thanks for the help! (Jakob Schmidt)
    Re: Bulk add to a hash.. Thanks for the help! (Jakob Schmidt)
    Re: Bulk add to a hash.. Thanks for the help! (brian d foy)
    Re: Bulk add to a hash.. Thanks for the help! <lr@hpl.hp.com>
    Re: Compiling SSLeay on Solaris 8 (brian d foy)
        CSV Hack Solution rets01@my-deja.com
    Re: CSV Hack Solution <jeff@vpservices.com>
    Re: fancy perl regex problem <callgirl@la.znet.com>
    Re: file locking not working (Craig Berry)
    Re: file locking not working <jeff@vpservices.com>
    Re: file locking not working (Craig Berry)
        Filtering out ads from egroups lists petcrows@my-deja.com
    Re: Filtering out ads from egroups lists (Greg Bacon)
    Re: Filtering out ads from egroups lists (Tony L. Svanstrom)
    Re: Filtering out ads from egroups lists (Craig Berry)
    Re: Finding a file in a huge filesystem (Craig Berry)
    Re: Getting the greedy RegEx, wanting the Lazy - help? ptomsic@my-deja.com
    Re: Getting the greedy RegEx, wanting the Lazy - help? <godzilla@stomp.stomp.tokyo>
    Re: Getting the greedy RegEx, wanting the Lazy - help? ptomsic@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 30 Aug 2000 11:36:15 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Any chance of a little more explanation?
Message-Id: <MPG.1416f3fa8d85c04798ad02@nntp.hpl.hp.com>

In article <lNZq5.40293$xg1.381373@news1.rdc1.sdca.home.com> on Wed, 30 
Aug 2000 01:52:17 GMT, Mark McCarthy <markmccarthy1@home.com> says...
> 
> "Larry Rosler" <lr@hpl.hp.com> wrote in message
> news:MPG.1415ed2af4a5235a98acf8@nntp.hpl.hp.com...

 ...

> > my @sorted =
> >     map substr($_, 1 + rindex $_, "\0") => sort
> >     map { my ($link4, $link2) = (split /\|/)[3, 1];
> >           pack 'A*xA*xA*' => uc $link4, uc $link2, $_ } <DATA>;

 ...

> Would it be too much to ask Larry for you to explain the GRT sort for me -
> not in abstraction but - say for this particular example. I understand the
> ST pretty well (mostly because of Tom's article). But GRT just blows my mind
> despite having read the paper you co-authored with Uri and other examples
> that use this method eg at http://www.perlfaq.com/faqs/id/162.
> 
> Even like three or four lines would be nice if you have time; Any insights
> will be much appreciated.

Eric Bohlmann gave a good general description.

For this particular example, each of the strings to be sorted is a 
concatenation of three strings separated by the null character "\0".  
There is an implicit assumption that that character isn't present in the 
data.  Using "\0" has the advantage of uniquely sorting shorter subkeys 
ahead of longer subkeys, when concatenated into strings with other 
stuff.  If isolated "\0"s can occur, one might imagine using "\0\0" or 
any other separator that will not be found in the data and that sorts 
lower than any character in the data.

  perldoc -f pack

Or one might write, in this case,

  map sprintf("\U%s\0%s\E\0%s" => (split /\|/)[3, 1], $_) => <DATA>; 

I like that better than the pack() example.

The retrieval of the data relies on finding the rightmost "\0" in the 
packed string.

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


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

Date: Wed, 30 Aug 2000 19:40:42 GMT
From: alphazerozero@my-deja.com
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <8ojnvm$58i$1@nnrp1.deja.com>

Gentlemen,

To be honest neither cycles nor memory are an issue here. The whole
objective was to avoid typing the hash's name over and over again.

I didnt realize the implications of the keys values as you used them

@$hash_reference{ keys %add } = values %add;

As for readability, thats not the hugest issue really, considering its
perl and im using stuff like

"opt" => $1 ? $1 : ""

(Which as i consider sending this will probably result in someone
showing me a better way....)

I mean perl isnt exactly the easiest of code to read.


Anyway
Thanks a lot
alphazerozero


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 30 Aug 2000 16:11:55 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <brian-ya02408000R3008001611550001@news.panix.com>

In article <8ojnvm$58i$1@nnrp1.deja.com>, alphazerozero@my-deja.com posted:

> I mean perl isnt exactly the easiest of code to read.

Perl has nothing to do with it.  it's a human issue.  the code
will be as readable as the programmer wants it to be no matter
what the language is.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Wed, 30 Aug 2000 22:19:08 +0200
From: sumus@aut.dk (Jakob Schmidt)
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <1eg76ep.1hpe8xb1frje0uN@[192.168.88.117]>

<alphazerozero@my-deja.com> wrote:

> Gentlemen,

Indeed. brian and I solved our differences via mail :-)

> As for readability, thats not the hugest issue really

When neither speed, memory or readability is particularly important I'd
choose the most readable solution. Readability influences
maintainability hugely - and thing always change.

> "opt" => $1 ? $1 : ""
> 
> (Which as i consider sending this will probably result in someone
> showing me a better way....)

sure :-)

opt => $1 || ""

x => y is equivalent to "x", y (and "x" => y) for all x =~ /\w+/ so you
don't need the quotes.
 
> I mean perl isnt exactly the easiest of code to read.

Probably not, but you can still keey it fairly tidy if you want.

-- 
Jakob


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

Date: Wed, 30 Aug 2000 22:27:20 +0200
From: sumus@aut.dk (Jakob Schmidt)
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <1eg77nq.1n7gxnz1ykyfdqN@[192.168.88.117]>

Jakob Schmidt <sumus@aut.dk> wrote:

> x => y is equivalent to "x", y (and "x" => y) for all x =~ /\w+/

make that /^\w+\z/

- I did it again (correting myself)

-- 
Jakob


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

Date: Wed, 30 Aug 2000 22:35:04 +0200
From: sumus@aut.dk (Jakob Schmidt)
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <1eg7804.d20lc8ffh33iN@[192.168.88.117]>

Jakob Schmidt <sumus@aut.dk> wrote:

> make that /^\w+\z/

or x !~ /\W/ (though this also matches the empty string)

> - I did it again (correting myself)

make that (correcting...)
                ^

-- 
Jakob


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

Date: Wed, 30 Aug 2000 16:41:38 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <brian-ya02408000R3008001641380001@news.panix.com>

In article <1eg77nq.1n7gxnz1ykyfdqN@[192.168.88.117]>, sumus@aut.dk (Jakob Schmidt) posted:

> Jakob Schmidt <sumus@aut.dk> wrote:
> 
> > x => y is equivalent to "x", y (and "x" => y) for all x =~ /\w+/

don't you mean

   x => 'y'

is equivalent, in a list, to

   'x', 'y'

remember that the bareword y is special ;)

> make that /^\w+\z/

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Wed, 30 Aug 2000 13:53:30 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Bulk add to a hash.. Thanks for the help!
Message-Id: <MPG.14171424a6415b0298ad05@nntp.hpl.hp.com>

In article <1eg77nq.1n7gxnz1ykyfdqN@[192.168.88.117]> on Wed, 30 Aug 
2000 22:27:20 +0200, Jakob Schmidt <sumus@aut.dk> says...
> Jakob Schmidt <sumus@aut.dk> wrote:
> 
> > x => y is equivalent to "x", y (and "x" => y) for all x =~ /\w+/
> 
> make that /^\w+\z/

Even that isn't true.  Try 1x => 'foo' for example.

Perhaps /^[^\W\d]\w*\z/  .

I haven't worked with locales, so I don't know whether that might 
include too many characters, and just ASCII letters should be used.

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


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

Date: Wed, 30 Aug 2000 16:29:57 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Compiling SSLeay on Solaris 8
Message-Id: <brian-ya02408000R3008001629570001@news.panix.com>

In article <39AD3CBD.3C1200DA@tmltechnologies.com>, Ralf Wiegand <rwiegand@tmltechnologies.com> posted:

> cc: unrecognized option `-KPIC'

this looks like Makefile.PL selected the wrong compiler at 
some point.  this has recently been discussed in one of the 
perl newsgroups or on the mod_perl list. :)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Wed, 30 Aug 2000 18:48:50 GMT
From: rets01@my-deja.com
Subject: CSV Hack Solution
Message-Id: <8ojku9$1cg$1@nnrp1.deja.com>

I was trying to break out Comma Separated Values.  I looked at perlfaq4
and TextParse and a few other things.

Dunce me!  I couldn't get any of them to break out the following data
correctly:

"90%","I said, ""He said, 'Arg!'""",100

So... I wrote the following sub out:

sub csv_parse {
    my $data = shift;
    my $separator = shift;
    my $quote = '"';
    my @values;
    my $toggle = 0;
    my $value;
    my $len = length($data);
    for ($i = 0; $i < $len; $i++) {
        $tmp = substr ($data, $i, 1);
        $toggle = $toggle ^ 1 if ($tmp eq $quote);
        $value .= $tmp;
        if ($tmp eq $separator) {
            if (! $toggle) {
                # End of word
                $value =~ s/,$//;
                $value =~ s/^\"//;
                $value =~ s/\"$//;
                $value =~ s/$quote+/$quote/g;
                push @values, $value;
                $value = "";
            }
        }
    }
    $value =~ s/^\"|\"$//;
    $value =~ s/$quote+/$quote/g;
    push @values, $value;
    for (@values) {
        print "[$_]<BR>\n";
    }
}

This is still in the debug stages of being written.  However, it does
what I want it to do.  It makes this:

"90%","I said, ""He said, 'Arg!'""",100

turn into the values:

[90%]
[I said, "He said, 'Arg!'"]
[100]

So the question is how can this function be made better?  I know this is
very hackish...  But it works.

Thanks all!

-Ken Holm


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 30 Aug 2000 12:19:40 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: CSV Hack Solution
Message-Id: <39AD5E4C.52984F64@vpservices.com>


rets01@my-deja.com wrote:
> 
> I was trying to break out Comma Separated Values.  I looked at perlfaq4
> and TextParse and a few other things.
> 
> Dunce me!  I couldn't get any of them to break out the following data
> correctly:
> 
> "90%","I said, ""He said, 'Arg!'""",100
> 

Did you try Text::CSV_XS?

use Text::CSV_XS;
my $p = Text::CSV_XS->new();
my $s = qq/"90%","I said, ""He said, 'Arg!'""",100/;
$p->parse($s) or print "Cannot parse line using CSV_XS\n";
print "[$_] " for $p->fields;

# output: [90%] [I said, "He said, 'Arg!'"] [100] 

-- 
Jeff


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

Date: Wed, 30 Aug 2000 14:34:14 -0700
From: "Godzilla!" <callgirl@la.znet.com>
Subject: Re: fancy perl regex problem
Message-Id: <39AD7DD6.5C4D2176@la.znet.com>

Dan wrote:
 
> I would appreciate your help solving this regex puzzle:
> I want to replace A with B except when it falls between X and Y.
> Example

>         A X A Y A  -->  B X A Y B
 
> A and B happen to represent pairs of HTML tags in my case.
> And there are many such pairs I wish to avoid substitution
> inside....

(snipped)


This is senseless. State your parameters clearly and
concisely if you expect decent resolution. You have
a document of sorts, you know what it contains, post
those details. Why are you not providing those details?

What is X? What is Y? What tags and other data fall between
X and Y? What tags and what else falls outside X and Y? What
are A and B? You know what is there; you hold this document.

This makes zero sense. You indicate A and B represent
pairs of html tags. This strongly suggests a format,

<html tag> </html tag>

for A and B, respectively or the reverse, who knows?.

This indicates your current format, before manipulation, is,

<html tag> data <html tag> data <html tag> etc...

Why do you have all opening tags and no closure for each tag?

After manipulation, your format would be,

</html tag> data <html tag> data </html tag> data <html tag> data ..etc

 ..or the reverse. How are people to know? Either way, forwards
or backwards, your parameters are senseless and concealed.

You hold this document of which you speak. Provide clear
and concise parameters if you want help. Otherwise this
is nothing more than an annoying guessing game.

Godzilla!

-- 
Perl Monger's Perfect Perl Perl Land.
  http://la.znet.com/~callgirl/perlperl.cgi


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

Date: Wed, 30 Aug 2000 19:45:37 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: file locking not working
Message-Id: <sqqp31acc5d156@corp.supernews.com>

soybean (soybean_tofu@yahoo.com) wrote:
: Remember the important thing about flock is that flock-ing a file will
: not stop other programs from opening, even erasing a flie. It only
: stops other programs from flock-ing it.

The analogy I developed to explain this is that of a traffic light.  When
all the drivers on both cross-streets unfailingly obey the traffic light
"locking" protocol, then collisions will never happen.  But all it takes
is a single driver ignoring the protocol to introduce the risk of
disaster.  And, of course, it could take anything from seconds to months
for the first collision to occur, depending on how busy the streets are. 
I find that this analogy really helps people new to flock(). 

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Every force evolves a form."
   |              - Shriekback


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

Date: Wed, 30 Aug 2000 13:31:04 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: file locking not working
Message-Id: <39AD6F08.BE9DB668@vpservices.com>

Craig Berry wrote:
> 
> soybean (soybean_tofu@yahoo.com) wrote:
> : Remember the important thing about flock is that flock-ing a file will
> : not stop other programs from opening, even erasing a flie. It only
> : stops other programs from flock-ing it.
> 
> The analogy I developed to explain this is that of a traffic light.  When
> all the drivers on both cross-streets unfailingly obey the traffic light
> "locking" protocol, then collisions will never happen.  But all it takes
> is a single driver ignoring the protocol to introduce the risk of
> disaster.  And, of course, it could take anything from seconds to months
> for the first collision to occur, depending on how busy the streets are.
> I find that this analogy really helps people new to flock().

Your analogy holds on systems where you have no control over other users
and other scripts.  In such a situation, there is no way to know when or
if some other car will run a red light.  But if you are on a system
where you can set things up such that only programs you write can access
the file and all of your programs have flock, then you are basically in
a situation in which it is impossible for someone else to run a red
light.  Now of course, you could yourself go in and start manually
mucking with the file without flocking, but that would be almost as
stupid as parking your car in the middle of the intersection and waiting
for the light to turn green.  Or then again, the system could crash
during an operation, which I suppose would be like the electricity for
the lights going out in which case collisions could occur without
someone actually having "run a red light".

Also, please send me the formula for doing "rollbacks" on auto
accidents.  My insurance rates would be much lower if I could perform
some transaction level locking on some of my driving. :-)

-- 
Jeff


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

Date: Wed, 30 Aug 2000 21:15:49 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: file locking not working
Message-Id: <sqquc5khc5d14@corp.supernews.com>

Jeff Zucker (jeff@vpservices.com) wrote:
: Your analogy holds on systems where you have no control over other users
: and other scripts.  In such a situation, there is no way to know when or
: if some other car will run a red light.  But if you are on a system
: where you can set things up such that only programs you write can access
: the file and all of your programs have flock, then you are basically in
: a situation in which it is impossible for someone else to run a red
: light.

Of course.  In terms of my analogy, this can be modeled by their being
only one driver on the road (though the analogy creaks a bit, as that one
driver may be behind the wheel of multiple cars...).  With only one
driver (behaving intelligently), there's no risk.

: Now of course, you could yourself go in and start manually
: mucking with the file without flocking, but that would be almost as
: stupid as parking your car in the middle of the intersection and waiting
: for the light to turn green.

That's about the level of stupidity I myself have observed, sometimes. :(

: Or then again, the system could crash
: during an operation, which I suppose would be like the electricity for
: the lights going out in which case collisions could occur without
: someone actually having "run a red light".

Yes, that's a very different question.  I guess you could analogize
transaction management as a system that guarantees that gridlock never
occurs, since cars either pass all the way through the intersection or
find themselves waiting back behind the limit line again. :)

: Also, please send me the formula for doing "rollbacks" on auto
: accidents.  My insurance rates would be much lower if I could perform
: some transaction level locking on some of my driving. :-)

Classic geek moment:  Riding with a programmer friend, said friend tries
to squeeze past another car in a crowded garage, bumpers lock, sound of
popping bolts and twisting metal.  After the obligatory string of
obscenity, his first coherent words:  "Okay, where's the 'undo' button?"

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Every force evolves a form."
   |              - Shriekback


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

Date: Wed, 30 Aug 2000 19:22:25 GMT
From: petcrows@my-deja.com
To: petcrows@yahoo.com
Subject: Filtering out ads from egroups lists
Message-Id: <8ojmso$409$1@nnrp1.deja.com>

Egroups just started putting top-placed ads on all the mailing lists on their
site. Previously for free lists they would have ads on the bottom of
messages. However now they put the ads on the top of all messages, unless you
pay egroups $60 a year.

I won't pay. First there was onelist. Then egroups bought out onelist. Then
yahoo bought out egroups. And now this. From no ads to ads on bottom to ads
on top right in your face.

Other services, such as topica and coollist and listserv.riddlersclub.com
either allow you to have ads on the bottom only, or no ads, depending on the
service. And there are others I am sure.

Anyway, since egroups doesn't seem to be listening & have pushed forward with
my plan to write a perl script through which I am going to filter all my
incoming mail. If egroups changes their mind and puts the ads back on the
bottom (& not the top) I will stop using the filter.

The way I use the filter is as follows:

1. Save all my incoming email to a single unix mail file. Agent allows this.

2. Filter the file using my perl program.

3. Import the mail from the filtered file using a separate install of Agent
with all my incoming mail filters intact (so that messages are split out by
group/list name).

Here is the program (if you have a simpler version please post it ;-) )...
Note that the program needed to be more complex to filter out the extra
carriage returns after the ad.

#!/usr/bin/perl
#

$input_file = 'mail_in_file';

$output_file = 'mail_out_file';

#note: save your incoming mail as mail_in_file #then filter it using perl &
this program #then import the mail back into your email program from the
#filtered file # #you may need to install your email program twice to do this
#once to receive your email from a POP server so you can then save it to a
file #and once to import the filtered mail from the filtered file which
results #from the running of this program - assuming that in the second
instance #you have a bunch of filters in your email program to split apart
the mail by #mailing list name

open (INFILE, "$input_file") || die "Can't open $input_file!\n"
open (OUTFILE, ">$output_file") || die "Can't open $output_file!\n"

$now_in_record = 'false';
$special_counter = '0';

$topline = "-------------------------- eGroups Sponsor
-------------------------~-~>" $bottomline =
"---------------------------------------------------------------------_->"

while (<INFILE>)
{
#  if (/-+ eGroups Sponsor -+~-~>/ .. /-+_->/)
   if ($_ =~ /$topline/)
   {
      $now_in_record = 'true';
   }
   if ($now_in_record eq 'true')
   {
      if ($_ =~ /$bottomline/)
      {
         $now_in_record = 'false';
         $special_counter = '2';
      }
   }
   if ($now_in_record eq 'false')
   {
      if ($special_counter ne '0')
      {
         $special_counter--;
      }
      else
      {
         print OUTFILE "$_"
#        print OUTFILE "$_" unless /-+ eGroups Sponsor -+~-~>/ .. /-+_->\n/;
      }
   }

#   chomp;

#   print "\$_ = $_\n"

#   if (/From:/)
#   {
#      s/From: //;
#      print "outfile: $_\n"
#      print OUTFILE "$_\n"
#   }
}
close (INFILE);
close (OUTFILE);

#----------end of program
#
# Also if you are aware of other free mailing list providers please
# email them to me at petcrows@my-deja.com.




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 30 Aug 2000 20:37:09 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Filtering out ads from egroups lists
Message-Id: <sqqs3lu6c5d10@corp.supernews.com>

In article <8ojmso$409$1@nnrp1.deja.com>,
     <petcrows@my-deja.com> wrote:

: Egroups just started putting top-placed ads on all the mailing lists on their
: site. Previously for free lists they would have ads on the bottom of
: messages. However now they put the ads on the top of all messages, unless you
: pay egroups $60 a year.

Isn't that extraordinarily annoying?

: Here is the program (if you have a simpler version please post it ;-) )...
: Note that the program needed to be more complex to filter out the extra
: carriage returns after the ad.

Why don't you do something simple like

    print OUTFILE unless /^\s*-{10,} egroups sponsor -{10,}/i
                         ..
                         /^\s*-{50,}/;

Greg
-- 
The balance of power is the scale of peace.  The same balance would be
preserved were all the world destitute of arms, for all would be alike;
but since some will not, others dare not lay them aside . . .
    -- Thomas Paine, "Thoughts on Defensive War"


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

Date: Wed, 30 Aug 2000 23:16:39 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Filtering out ads from egroups lists
Message-Id: <1eg79xu.n9l29jcazbz7N%tony@svanstrom.com>

<petcrows@my-deja.com> wrote:

> Anyway, since egroups doesn't seem to be listening & have pushed forward
> with my plan to write a perl script through which I am going to filter all
> my incoming mail. If egroups changes their mind and puts the ads back on
> the bottom (& not the top) I will stop using the filter.
> 
> The way I use the filter is as follows:

That sounds like a lot of fun... NOT. If you can use a .forward-file
then I have something that will do the trick.


     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
   on the verge of frenzy - i think my mask of sanity is about to slip
 ---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
    \O/   \O/  ©99-00 <http://www.svanstrom.com/?ref=news>  \O/   \O/


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

Date: Wed, 30 Aug 2000 21:19:38 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Filtering out ads from egroups lists
Message-Id: <sqquja3sc5d111@corp.supernews.com>

Greg Bacon (gbacon@HiWAAY.net) wrote:
: In article <8ojmso$409$1@nnrp1.deja.com>, <petcrows@my-deja.com> wrote:
: 
: : Egroups just started putting top-placed ads on all the mailing lists on their
: : site. Previously for free lists they would have ads on the bottom of
: : messages. However now they put the ads on the top of all messages, unless you
: : pay egroups $60 a year.
: 
: Isn't that extraordinarily annoying?

It is -- and I use egroups heavily -- but they gotta get revenue from
somewhere.  I hate it, but I'd hate it worse to have them die. 

I think we can expect most of the previously free or low-key-ad-supported
services to evolve similarly this year.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Every force evolves a form."
   |              - Shriekback


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

Date: Wed, 30 Aug 2000 18:27:53 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Finding a file in a huge filesystem
Message-Id: <sqqkh94ic5d25@corp.supernews.com>

nkhan75@hotmail.com wrote:
: I need to find a file, say foo.txt, in a file tree that contains
: several thousand files. Just traversing through the tree takes over 2
: hours on a strong machine.

I would be quite worried if traversing a tree that small required more
than a minute or two.  I suspect your algorithm is seriously suboptimal.

: Hence I need to come up with Perl code
: which, as soon as it finds the file, stops the search. Ofcourse, if the
: file does not exist the code will step through all the files in the
: tree looking for foo.txt.

See the File::Find module.  If you're going to be doing this repeatedly,
you may wish to consider some sort of indexing or caching scheme to save
the overhead of multiple searches.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Every force evolves a form."
   |              - Shriekback


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

Date: Wed, 30 Aug 2000 18:18:35 GMT
From: ptomsic@my-deja.com
Subject: Re: Getting the greedy RegEx, wanting the Lazy - help?
Message-Id: <8ojj53$v3o$1@nnrp1.deja.com>

In article <39AD1EF8.7AAF50D4@la.znet.com>,
  "Godzilla!" <callgirl@la.znet.com> wrote:
> ptomsic@my-deja.com wrote:
>
>
> What the F-word is this idiotic mule manure? Planning on
> changing your parameters again if someone provides a
> decent reasonable answer?
>
[snip: mostly rant...]
>
>
> Both you and your articles are full of mule manure.
>
> Godzilla!


Funny reply.  I didn't realize that a mere amateur such as myself was
worthy of a reply from the likes of you, not to mention a reply that
appears to have made you drop your uterus in angst.   I almost slipped
on it whilst running thru the replies of my post.

Thanks for the solution, though.  Your time is of the essence to me,
even if you require a mild beta-blocker after your posting.





Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 30 Aug 2000 12:12:42 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Getting the greedy RegEx, wanting the Lazy - help?
Message-Id: <39AD5CAA.F09E538D@stomp.stomp.tokyo>

ptomsic@my-deja.com wrote:

> Godzilla! wrote:
> > ptomsic wrote:

> > What the F-word is this idiotic mule manure? Planning on
> > changing your parameters again if someone provides a
> > decent reasonable answer?

(snipped)

> > Both you and your articles are full of mule manure.

> Funny reply.

Hilarious I believe. Wanna shovel or pitch fork?


> I didn't realize that a mere amateur such as myself was
> worthy of a reply from the likes of you...

You are an amateur, both at mindgames and at Perl. No, you
are not worthy of a response. I wrote my response for no
other reason than pure pleasure; enjoyment of knowing
you will wig-out and reply within minutes in attempt
to cover your sorry arse. Your mind is mine, as always.


> not to mention a reply that appears to have made you drop
> your uterus in angst.   I almost slipped on it whilst running 
> thru the replies of my post.

Actually, it is your unhealthy ego which you consistently
slip and trip upon. Real ego tripper, you are.


> Thanks for the solution, though.

Seems I am the only around providing realistic
practical solutions. Moreover, I enjoy causing
Perl 5 Cargo Cultists to mess their diapers
with code beyond their limited imagination.


> Your time is of the essence to me,

Should be. Look how much I have taught you about
Perl over the years, much to your consternation.


> even if you require a mild beta-blocker after your posting.

Right. Speaking of beta, remember those hard lessons
I taught you via your first beta chatline? Isn't this
why I frighten you so? I can do what you say is impossible.
Try to fathom what I know and can do, never shared with you.

Greatest trick, my fondest, is making one of your chats
eat all posts except mine. Everybody makes a post, only to 
watch it be eaten and replaced by my last posting. *laughs*
That was a slick trick. However, not as impressive as when 
I reformatted perl core at your server requiring a server
reset to clear. Such comical results, I'll tell you. Have
to admit, although only a moderate hacker, I do have a 
healthy sense of humor, when it comes to hacking. I wear
a white hat and, little else as most know.
 
Incidently, like my new hair style? I think I look
darn good for forty, or so.


Well, I am off to hack this new version of Mozilla
to make it do what I want. Come up and see me sometime,
Big Boy.


Godzilla!

-- 
Perl Monger's Perfect Perl Perl Land.
  http://la.znet.com/~callgirl/perlperl.cgi


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

Date: Wed, 30 Aug 2000 20:11:36 GMT
From: ptomsic@my-deja.com
Subject: Re: Getting the greedy RegEx, wanting the Lazy - help?
Message-Id: <8ojpp3$7jq$1@nnrp1.deja.com>

In article <39AD5CAA.F09E538D@stomp.stomp.tokyo>,
  "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> ptomsic@my-deja.com wrote:

>
> Should be. Look how much I have taught you about
> Perl over the years, much to your consternation.

Well, not that this should be a medium for a side bar between the two
of us, but I do appreciate your test script.  As for teaching me over
the "YEARS" perhaps you were one of my college professors?

> I taught you via your first beta chatline? Isn't this
> why I frighten you so? I can do what you say is impossible.
> Try to fathom what I know and can do, never shared with you.

And a CHAT line?  To what are you referring?


>
> Greatest trick, my fondest, is making one of your chats
> eat all posts except mine. Everybody makes a post, only to
> watch it be eaten and replaced by my last posting. *laughs*
> That was a slick trick. However, not as impressive as when
> I reformatted perl core at your server requiring a server
> reset to clear. Such comical results, I'll tell you. Have

My SERVER?  Perl CORE?  Care to elaborate?







Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 4179
**************************************


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