[12240] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5840 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 31 10:08:07 1999

Date: Mon, 31 May 99 07:00:19 -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           Mon, 31 May 1999     Volume: 8 Number: 5840

Today's topics:
    Re: Anyone know what is this script line meaning ?? tvn007@my-deja.com
    Re: Can someone help me on this challenging problem? (Michel Dalle)
        CGI/Perl "=?iso-8859-1?Q?=E4=F6=FC?=" problems <mario@walker.org>
    Re: current date (Jim Britain)
        Fetch URL behind a proxy <apa@jerez.micro.lucent.com>
        How to format output ? (Raz Uri )
    Re: How to format output ? (Brad Knowles)
    Re: How to format output ? <fruffet@kaptech.com>
    Re: How to Post Packages to the ActiveState Package Rep (Murray Nesbitt)
        Incoming eMail -> Perl script -> Forward <news@emphasinlabs.de>
    Re: perl -w, "uninitialized" variables, and the Perl la (Bernie Cosell)
    Re: perldoc -f alarm <michiel.verhoef@wkap.nl>
        please help on finding longest string in file tvn007@my-deja.com
    Re: Problems w/ Perl 5.005_03 & tying hashes to dbm dat (Brad Knowles)
        Quick way to count lines in file? <vasquez@zap.a2000.nl>
    Re: Quick way to count lines in file? <marian.kelc@ruhr-uni-bochum.de>
    Re: Quick way to count lines in file? <vasquez@zap.a2000.nl>
        Read-Only values <info@edoc.co.za>
    Re: Sort process <Tobin@breathemail.net>
    Re: Sort process (Marko R. Riedel)
    Re: where can i get a free Perl compiler on line? <Tobin@breathemail.net>
    Re: where can i get a free Perl compiler on line? <michiel.verhoef@wkap.nl>
    Re: where can i get a free Perl compiler on line? (Murray Nesbitt)
    Re: where can i get a free Perl compiler on line? <office@asc.nl>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 31 May 1999 07:59:47 GMT
From: tvn007@my-deja.com
Subject: Re: Anyone know what is this script line meaning ??
Message-Id: <7itfhh$2st$1@nnrp1.deja.com>

Be Kind to others please

You do not have to reply to him/her with such answer.



In article <slrn7l4ca9.ov6.sholden@pgrad.cs.usyd.edu.au>,
  sholden@cs.usyd.edu.au wrote:
> On 31 May 1999 06:44:58 GMT, Austin Ming <austin95002887@yahoo.com>
wrote:
> >
> >--> @files = grep { $_ !~ m/^\./} readdir(DIR);
> >
> >Anyone know what is this script line meaning ??
>
> Yes.
>
> Why don't you look up the documentation on readdir and grep and
> then you can know too...
>
> --
> Sam
>
> Remember that the P in Perl stands for Practical.  The P in Python
> doesn't seem to stand for anything.
> 	--Randal Schwartz in <8cemsabtef.fsf@gadget.cscaper.com>
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 31 May 1999 13:18:00 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Can someone help me on this challenging problem?
Message-Id: <7iu275$d0j$1@news.mch.sbs.de>

In article <374EFDD9.E7802C23@microsoft.com>, plz_reply_to_group <none@microsoft.com> wrote:
>Check out the Algorithm of the Gods, at
>http://web2.thesphere.com/SAS/SciAm/1997/SimAneal/SimAneal.html. It is
>the elaboration of an article from Scientific American magazine, March,
>1997, about an algorithm for solving traveling-salesman-type problems.
>It's a really good article, in fact the web site is one of the best on
>the net. Really.
>

Seems interesting, but what about the following 'brute-force' approach ?
For a list of 5000 nodes, each with 10-12 connections (as the original poster 
asked), this finds a path with 4 connections in 0.12 seconds.

 ..
@todo = ($start);
$parent[$start] = "";
$level = 1;
while (&get_child() == 0) {
        $level++;
}
print "Found a path from $start to $end in $level connections :\n";
&show_parent($end);
exit;

sub get_child {
        my($node,@newtodo);

        if (scalar @todo == 0) {
                return 2;
        }
        @newtodo = ();
        foreach $node (@todo) {
                foreach $child (@{$list[$node]}) {
                        if ($child == $end) {
                                $parent[$child] = $node;
                                return 1;
                        }
                        elsif (!defined($parent[$child])) {
                                $parent[$child] = $node;
                                push(@newtodo,$child);
                        }
                }
        }
        @todo = (@newtodo);
        return 0;
}
sub show_parent {
        my($child) = @_;
        if ($parent[$child] ne "") {
                &show_parent($parent[$child]);
        }
        print "$child ";
}

Sorry it's not in 'Virtual English', whatever that means :-)

Michel.

--
aWebVisit - extracts visitor information from WWW logfiles and shows
the top entry, transit, exit and 'hit&run' pages, the links followed
inside your website, the time spent per page, the visit duration etc.
For more details, see http://gallery.uunet.be/Michel.Dalle/awv.html


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

Date: Mon, 31 May 1999 11:42:38 +0200
From: Mario Walker <mario@walker.org>
Subject: CGI/Perl "=?iso-8859-1?Q?=E4=F6=FC?=" problems
Message-Id: <3752598D.46CA317B@walker.org>

Hi all.
I've a really damned problem.

My cgi/perl script gets datas from web and sends them
per POP3 server to an emailadress.
Because I use a german-keyboard, there are some
special character like dv| (called "Umlaute" in german).

In the mail, we can't read those special characters.
There are very strange signs !

Any ideas what to do ?

Thanks in advance !
Cheers, Mario.



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

Date: Mon, 31 May 1999 09:10:55 GMT
From: jbritain@home.com (Jim Britain)
Subject: Re: current date
Message-Id: <3752521c.79486034@news>

On Mon, 31 May 1999 05:30:21 GMT, slegarre@ireste.fr wrote:

>I need the date of the day, is there a function provided it?
>

perldoc -f localtime



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

Date: Mon, 31 May 1999 12:00:41 +0200
From: "Antonio Pascual" <apa@jerez.micro.lucent.com>
Subject: Fetch URL behind a proxy
Message-Id: <7itmmi$h0@nntpb.cb.lucent.com>

Anyone knows how to fetch a URL by http or ftp
being behind a proxy server?.

regards,

Antonio.






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

Date: 31 May 1999 09:48:13 GMT
From: s2845543@t2.technion.ac.il (Raz Uri )
Subject: How to format output ?
Message-Id: <7itlst$t6$1@techftp.technion.ac.il>

 I'd like to have a perl script generate formatted output.

 More specifically - I print a list of items and item counts in two rows,
 and want the rows to have a constant width.

 How can I do that ?

-- 
 +----------+-----------------------------------+------------------------------+
 | Uri Raz  | mailto:s2845543@t2.technion.ac.il | kaum vit litz, tor lod vike. |
 | TCP/IP Res. list  http://www.private.org.il/tcpip_rl.html                   |
 | TCP/IP Apps FAQ   http://www.private.org.il/mini-faq.html                   |
 +-----------------------------------------------------------------------------+


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

Date: Mon, 31 May 1999 12:22:31 +0200
From: brad@shub-internet.org (Brad Knowles)
Subject: Re: How to format output ?
Message-Id: <brad-3105991222310001@brad.techos.skynet.be>

In article <7itlst$t6$1@techftp.technion.ac.il>,
s2845543@t2.technion.ac.il (Raz Uri ) wrote:

>  More specifically - I print a list of items and item counts in two rows,
>  and want the rows to have a constant width.

    See pp. 121-127 of _Programming Perl, 2nd Ed._ by Larry Wall, Tom
Christiansen & Randal L. Schwartz, published by O'Reilly & Assoc.

    Or, see pp. 75-77 of _Perl in a Nutshell_, by Ellen Siever, Stephen
Spainhour, & Nathan Patwardhan, published by O'Reilly & Assoc.


    This is probably also covered in the Perl FAQ, and who knows how many
other places.

-- 
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>

Are you looking for a news feed from a site in the Freenix Top 130?
If so, contact me via private e-mail for details.


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

Date: Mon, 31 May 1999 13:05:32 +0200
From: "Fred Ruffet" <fruffet@kaptech.com>
Subject: Re: How to format output ?
Message-Id: <7itolt$lpn$1@gatekeeper.ornano.kapt.com>

Let's make a perldoc -f format...

Regards,

Fred





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

Date: Mon, 31 May 1999 11:00:50 GMT
From: mjn@activestate.com (Murray Nesbitt)
Subject: Re: How to Post Packages to the ActiveState Package Repository?
Message-Id: <CZt43.30827$M12.31046@news.rdc1.bc.wave.home.com>

Dan Harasty  <dan001@penvision.com> wrote:
> 
> I'd like to know the mechanism for submitting packages to ActiveState's
> package repository.
>
> Specifically, I pulled some things down of CPAN that worked well after
> doing all the "make" mumbo-jumbo; but to redistribute them *within* my
> org I converted them into the format that the PPM uses to install
> packages for ease of use.
> 
> Now that I've gone through the effort, and assuming others would be able
> to make use of the packages, what can I do to get them "posted" in the
> package repository?

I'd suggest sending a patch to the package author, detailing
any changes you had to make.  If you could CC me, that will
probably help.

In general, if we get a request for a PPM installable module or
extension, and we can do:

    make
    make test
    make ppd (optional, but appreciated)

we can make it available as a PPM package.

Murray



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

Date: Mon, 31 May 1999 07:57:43 GMT
From: Markus Gruen <news@emphasinlabs.de>
Subject: Incoming eMail -> Perl script -> Forward
Message-Id: <7itfdl$2sl$1@nnrp1.deja.com>

Hi Community,

my father asked me to help him with a kind of mailing list:

The situation: My father wants to have a kind of mailing list for his
homepage. He has his own virtual webserver, but he is not allowed to
setup an own mailinglist a la majordomo and stuff.

What is working: You are able to run a perl-script by an incoming email
by editing the .redirect in the way of "mailname
|/path/to/bin/sendmail.pl", so that the incoming mail will start the
sendmail.pl, which sends me a testmail. This works properly, no problems
!

What is _not_ working: Someone told me, that you are able to readout the
text of the incoming and script-starting email by STDIN. The started
script should be able to readout the STDIN...problem: I don't know perl
that good ! I just know the basics and am able to program a _bit_.

What I need to know: How am I able to read the STDIN (what is it??) to
get the text of the mail ?? If I could do so, I would be able to setup a
new mail (sendmail...) to the whole mailing list and send it...the
normal newsletter you are able to download everywhere are not that
usefull, because that the user in my father's case should send his mail
by email, not by a web form.

I would be really very happy, if a pro may can help me with this
problem. Thank you for your attention :)

Bye bye,
Markus
eMail: news@emphasinlabs.de


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 31 May 1999 13:30:44 GMT
From: bernie@fantasyfarm.com (Bernie Cosell)
Subject: Re: perl -w, "uninitialized" variables, and the Perl language spec
Message-Id: <375283df.24064092@news.supernews.com>

rjk@linguist.dartmouth.edu (Ronald J Kimball) wrote:

} John Siracusa <macintsh@cs.bu.edu> wrote:
} 
} > It's my understanding that all newly-created perl variables are
} > guaranteed to to evaluate to be "empty" (i.e. evaluate to "false").
} > Notice I didn't call them "uninitialized" variables, because, IMO,
} > they *are* initialized--with undef or "emptiness" or whatever.  A
} > truly uninitialized variable would contain random garbage, as in
} > lower-level languages like C (in most circumstances).  This is one
} > of the reasons many people use Perl: it's a higher-level language
} > that isolates the programmer from many tedious tasks.
} 
} Notice that the warning reads "uninitialized value", not "uninitialized
} variable".  The uninitialized value in Perl is called undef.
} 
} Even with $foo = undef, which might be called an initialization, the
} value of $foo is still uninitialized.

It is hard to understand exactly, quite, what the problem is here, but this
dismissal misses the point, I think.  There are (at least! :o)) two quite
separate software-errors that can be caught by using out-of-band values
[ala NAN for Floating point]: one is using a variable that has never been
initialized, and the other is using a variable that has been assigned a
value that is improper (usually the result of not checking for errors).

The easiest to see distinction between those two is in C, where if you have
an auto char * vbl, dereferencing it without having initialized it is a
VERY different matter than not having checked the return value from some
function call and then trying to dereference through NULL.  [In particular,
the first might not get you an error at all, but just crazy,
unreproduceable, erroneous behavior!].

The original question, I think, is whether it might be of much/any utility
in Perl [and, indeed, whether it would break anything, which I doubt] to
have more than one "out of band value" and convey the actual out-of-band
semantics more clearly.  In particular, Perl could use a different o-o-band
value for 'undef' than it does for the initial value of never-assigned-to
variables (and so be able to distinguish between the two 'C' cases
mentioned above).

Or, for example, if you're familiar with databases it is fairly SOP for
databases to support an out-of-band "Empty" value for fields.  It might be
nice, in a similar way, if you call a subroutine to fetch a value, to be
able to tell the difference between "an error occurred" and "no error,
everything's fine, but this value is 'empty'"  [e.g., on a DB retrieval: if
you fetch the field, you really ought to be able to tell the difference
between "got an error accessing the database" and "the field you asked for
was empty"]

And if Perl had a vocabulary like that for out-of-band values, then one
could envision variations on -w that could specify different actions for
using different oob values...

  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Mon, 31 May 1999 12:06:37 +0200
From: Michiel Verhoef <michiel.verhoef@wkap.nl>
Subject: Re: perldoc -f alarm
Message-Id: <37525F2D.F98FBC62@wkap.nl>



Sam Holden wrote:

> On 31 May 1999 09:44:02 +0200, Michiel Verhoef <michiel.verhoef@wkap.nl> wrote:
> >I know from several commercial programms tthat kill -9 $pid is an accepted
> >way to end
> >programs.  In fact, several systems I know of leave a small pid file in a
> >directory that is
> >read and used by stop scripts to kill the server...
>
> You have got to be joking... -9 is a bit excessive shall we say...
>

Oops, sorry, you're right, it's only 'kill', no '-9' ...
Anyway, 'kill' is an accepted way to end programs :-)

Michiel




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

Date: Mon, 31 May 1999 08:18:13 GMT
From: tvn007@my-deja.com
Subject: please help on finding longest string in file
Message-Id: <7itgk5$3jm$1@nnrp1.deja.com>

Hi,

Would someone please help me with this problem ?

I have been trying for couple of hours and have
not get the right answer yet,  I will keep trying ..

Here is the problem:

I have a file as follow:

input1 = 1's0;
input2 = 5's01111;
input3 = 10's0000000110;
input1 = 1's0;
input2 = 5's00000;
input3 = 10's0001111100;
input1 = 1's1;
input2 = 5's11111;
input3 = 10's0111110111;

#########################

I would like the output as follow:
"longest input is: input3 has 10 elements

#since input3 has ten 0/1
#since input2 has five 0/1
#since input 1 has one 0/1



#################
Thanks for your help,





Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 31 May 1999 12:16:31 +0200
From: brad@shub-internet.org (Brad Knowles)
Subject: Re: Problems w/ Perl 5.005_03 & tying hashes to dbm databases...
Message-Id: <brad-3105991216310001@brad.techos.skynet.be>

In article <3751FC20.690F9A21@frontiernet.net>, Bob Walton
<walton@frontiernet.net> wrote:

> Brad, it looks like your tied hash values are references to another hash
> (like $LogFile{x}{y}, for example).  The problem with that is that the
> tied hash saves the reference to the inner hash (which is a scalar and
> can be stored in a hash).  Later, when the tied hash returns a key
> value, it returns a reference to a hash that no longer exists.

    Hmm.  How then does one tie a hash of hashes to a database?  I'm
already saving the hash key as one of the RHS values within the internal
hash ($LogLine{$LogEntry}{entry} = $LogEntry), so that I can pull this
information out myself when the time comes.

    In terms of hashes-of-hashes, I've at least run into this problem
before, and I have some idea of how it has to be solved.  I just don't
know how to solve it relative to a tied database.

>                         Data::Dumper is one possible solution to the
> problem: stringify the referenced hash and save that as the value of
> the tied hash.  Then when the tied hash is read again later, the
> string is retrieved, and the complete referenced has may be
> reconstructed with an eval.

    I don't think "Data::Dumper" exists anymore, does it?  I don't recall
being able to find it the last time I was slogging through CPAN.

    Assuming it does work, can you give me any examples of how I might use it?

> In your case, it looks like a simpler solution might be to just append the
> "begin", "end", "count", "entry", etc strings to the key of the tied hash, and
> use that instead of having the values of the tied hash be another hash.  For
> example, replace $LogLine{$oldEntry}{begin} with $LogLine{$oldEntry.'begin'},
> with like changes throughout your code.

    Unfortunately, I don't think that's going to work.  If you look down
around line 114, I start a "foreach" loop with $i iterating on the sorted
hash keys, and then I pull out specific references to things like
"$LogLine{$i}.{begin}", "$LogLine{$i}{end}", etc....

    Once everything is munged together into just one dimension of the
hash, $i would take on all sorts of values ending with ".count", ".begin"
and ".end", and I don't think that there's any way I could keep the whole
thing straight.

-- 
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>

Are you looking for a news feed from a site in the Freenix Top 130?
If so, contact me via private e-mail for details.


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

Date: Mon, 31 May 1999 13:55:04 +0200
From: Joel Wijngaarde <vasquez@zap.a2000.nl>
Subject: Quick way to count lines in file?
Message-Id: <37527898.2C18A972@zap.a2000.nl>

Hi

I need to put data into an array but i don't know the file size (in
lines) in advance.
Is there a quick/smart way of getting this information or do i have to
read every line and use a counter?

Sincerely,

Joel Wijngaarde


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

Date: Mon, 31 May 1999 15:02:23 +0200
From: Marian Kelc <marian.kelc@ruhr-uni-bochum.de>
Subject: Re: Quick way to count lines in file?
Message-Id: <3752885F.78703207@ruhr-uni-bochum.de>

> I need to put data into an array 

@a=<FILEHANDLE>;

> but i don't know the file size (in lines) in advance.

you mustn't know the filesize in advance in this case

> Is there a quick/smart way of getting this information or do i have to
> read every line and use a counter?

while( <FILEHANDLE> ) { push @a, $_; ++$i }

Marian Kelc


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

Date: Mon, 31 May 1999 15:02:21 +0200
From: Joel Wijngaarde <vasquez@zap.a2000.nl>
Subject: Re: Quick way to count lines in file?
Message-Id: <3752885D.94F545BC@zap.a2000.nl>

Marian Kelc wrote:
> 
> > I need to put data into an array
> 
> @a=<FILEHANDLE>;
> 
> > but i don't know the file size (in lines) in advance.
> 
> you mustn't know the filesize in advance in this case
> 
> > Is there a quick/smart way of getting this information or do i have to
> > read every line and use a counter?
> 
> while( <FILEHANDLE> ) { push @a, $_; ++$i }
> 
> Marian Kelc

Thanks,

Obviously i'm to much a C programmer (i.e.. allocating/de allocating)...

-- 
Jokl Wijngaarde (vasquez@zap.a2000.nl)

Quote:
	"The final solution is possibly a little extreme - create a new
	 country - and then export all lawyers there.  The Brit's tried
  	 this with Australia, but somehow something went awry
	 somewhere along the line."

	"Hrm.  The whole of Europe did that with America and it seems to
	 have been moderately successful."


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

Date: Mon, 31 May 1999 14:05:41 +0200
From: Nico van der Dussen <info@edoc.co.za>
Subject: Read-Only values
Message-Id: <37527B14.951B6D2C@edoc.co.za>

Hi,

I all of a sudden encountered a problem with an error message telling
me: Modification of a read-only value attempted at ./test.pl line 221.

The line involved is: $quotevalue = $dbn->quote($rawvalue);

I've done this many times before without this problem.

Any suggestions?

How does one get a variable to be "read-only?  Maybe if I undestand
this, I will be able to figure out my problem.

Thanks

Nico



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

Date: Sun, 30 May 1999 09:22:57 +0100
From: "Tobin" <Tobin@breathemail.net>
Subject: Re: Sort process
Message-Id: <3752464a@news1.vip.uk.com>

I have just done this recently, although I don't know if I used the most
efficient method. The way I did it was to use hashes. One of the 'fields' in
the hash was called 'count' - which was incremented every time a match was
made on that record in the search.

In my proggy this worked by keyword. So if one record matched on 2 keywords
the count would be incremented twice for that record.

What you could then do was sort the ouput of the search by 'count' so that
the records with the best match were printed at the top of the list.

Hope this was of any help.

Tobin



Twarren10 wrote in message <19990531012424.20837.00007670@ng-cf1.aol.com>...
>I am a new Pearl programmer who is working on a search program, which
>uses a pipe delimited databases (|). Everything is working great in
>search, the problem I am having now is in sorting the results in order to
list
>the matches which have more of the search terms higher than the matches
which
>have less. I know how to sort alphabetically, but this has me stumped. Can
>anyone give me an idea how to accomplish this? Your help would be
appreciated.
>
>for example, I want to list the matches which have three of the search
terms in
>the number 1 list slot, with two would be listed number two, etc.
>




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

Date: 31 May 1999 11:15:34 +0200
From: mriedel@neuearbeit.de (Marko R. Riedel)
Subject: Re: Sort process
Message-Id: <lzzp2l8urt.fsf@linux_sexi.neuearbeit.de>

twarren10@aol.com (Twarren10) writes:

> I am a new Pearl programmer who is working on a search program, which
> uses a pipe delimited databases (|). Everything is working great in
> search, the problem I am having now is in sorting the results in order to list
> the matches which have more of the search terms higher than the matches which
> have less. I know how to sort alphabetically, but this has me stumped. Can
> anyone give me an idea how to accomplish this? Your help would be appreciated.
> 
> for example, I want to list the matches which have three of the search terms in
> the number 1 list slot, with two would be listed number two, etc. 

[TWARREN] find /var/catman/ | sed 's/\//|/g' | twarren.pl allman cat8
|var|catman|allman|de|cat8
|var|catman|allman|cat8
|var|catman|allman|de|cat9
|var|catman|allman|de|catn
|var|catman|allman|index.bt
|var|catman|cat8|faxstate.8c.gz
|var|catman|cat8|apmd.8.gz
|var|catman|cat8|faxmodem.8c.gz
|var|catman|cat8
|var|catman|X11R6|cat8
|var|catman|cat8|renice.8.gz
|var|catman|cat8|smbd.8.gz
|var|catman|cat8|faxgetty.8c.gz
|var|catman|allman
|var|catman|allman|cat1
|var|catman|allman|cat2
|var|catman|allman|cat3
|var|catman|allman|cat4
|var|catman|allman|cat5
|var|catman|allman|cat6
|var|catman|allman|cat7
|var|catman|allman|de|cat7
|var|catman|allman|cat9
|var|catman|allman|catn
|var|catman|allman|de
|var|catman|allman|de|cat1
|var|catman|allman|de|cat2
|var|catman|allman|de|cat3
|var|catman|allman|de|cat4
|var|catman|allman|de|cat5
|var|catman|allman|de|cat6
|var|catman|de|cat8
|var|catman|local|cat8
|var|catman|openwin|cat8
|var|catman|es|cat8
|var|catman|fr|cat8
|var|catman|it|cat8
|var|catman|X11R6|cat5
|var|catman|X11R6|cat6
|var|catman|X11R6|cat7
|var|catman|X11R6|cat9
|var|catman|X11R6|catn
|var|catman|X11R6|index.bt
|var|catman|cat1
|var|catman|cat1|308
[SNIP]

#! /usr/bin/perl -w
#


MAIN: {
  my (@terms)=@ARGV;
  my (@data)=map {
    chomp; [ split /\|/ ];
  } <STDIN>;
  my (@counts)=(0) x ($#data+1);

  for(my $ind=0; $ind<=$#data; $ind++){
      foreach $term (@terms){
	$counts[$ind]++ 
	  if grep /\Q$term\E/, @{$data[$ind]};
      }
    }

  
  my @result = 
    map { $data[$_] } sort { -($counts[$a] <=> $counts[$b]) } 
     (0..$#data);

  $\="\n"; foreach $line (@result){
    print join '|', @$line;
  }
}


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

Date: Sun, 30 May 1999 09:12:13 +0100
From: "Tobin" <Tobin@breathemail.net>
Subject: Re: where can i get a free Perl compiler on line?
Message-Id: <375243c6@news1.vip.uk.com>

Try the Activestate (www.activestate.com) web site - they have the latest
version of Perl for all platforms. It might be worth looking at www.Perl.com
for other links too.


Eddie wrote in message <7itaqd$e7b@enews2.newsguy.com>...
>I use win98, i need to know if there  is a free perl compiler online for
>win98.can you tell me  which web site, i can go to download it.
>Thanks.
>
>Eddie R
>
>




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

Date: Mon, 31 May 1999 10:13:18 +0200
From: Michiel Verhoef <michiel.verhoef@wkap.nl>
Subject: Re: where can i get a free Perl compiler on line?
Message-Id: <3752449E.2FEAE9D8@wkap.nl>

All perl interpreters are free. Visit www.perl.com.


Michiel


Eddie wrote:

> I use win98, i need to know if there  is a free perl compiler online for
> win98.can you tell me  which web site, i can go to download it.
> Thanks.
>
> Eddie R



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

Date: Mon, 31 May 1999 11:03:17 GMT
From: mjn@activestate.com (Murray Nesbitt)
Subject: Re: where can i get a free Perl compiler on line?
Message-Id: <V%t43.30828$M12.30648@news.rdc1.bc.wave.home.com>

In article <7itaqd$e7b@enews2.newsguy.com>, Eddie <edruba@cruzio.com> wrote:
> I use win98, i need to know if there  is a free perl compiler online for
> win98.can you tell me  which web site, i can go to download it.

http://www.activestate.com/

Murray



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

Date: Mon, 31 May 1999 13:52:57 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: where can i get a free Perl compiler on line?
Message-Id: <7itt9a$ls1$1@zonnetje.NL.net>

there is NO perl compiler

you CAN'T convert perl code into systemoriented code , as it's
multi-platformed and absolutely compatible with every version (as long as
it's the same *g*)

cul8r
buZz

Eddie heeft geschreven in bericht <7itaqd$e7b@enews2.newsguy.com>...
>I use win98, i need to know if there  is a free perl compiler online for
>win98.can you tell me  which web site, i can go to download it.
>Thanks.
>
>Eddie R
>
>




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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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