Re: find uniq paths in @INC

2003-06-28 Thread John W. Krahn
Harry Putnam wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> writes: > > > > And then get the sorted list like this: > > > > @sorted = sort { $name{ $a } cmp $name{ $b } } keys %name; > > I've seen that in books and stuff but was never able to fathom out > how it does what it does. So never actua

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
"John W. Krahn" <[EMAIL PROTECTED]> writes: >> But it doesn't really give the results I was after either. I wanted >> the sort on short *.pod name. Other wise I have things like: >>/usr/lib/perl5/5.6.1/Win32.pod >> coming first. >> >> So my formulation may be better in that regard. > > Popu

Re: find uniq paths in @INC

2003-06-28 Thread John W. Krahn
Harry Putnam wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> writes: > > > Harry Putnam wrote: > >> > >> @sorted = sort @unsorted; > > > > You probably should use the keys of %name which are unique. > > How cool, I hadn't realized this expression: >if ($name{$File::Find::name}++ == 0){ > Actu

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
Harry Putnam <[EMAIL PROTECTED]> writes: > Whew, for a minute there I thougt I'd screwed that up too. But why > are there dups to begin with? Gets us right back to SPENCERS who had it right from the start. I wish I knew better what this code is doing: if (-d && /^[a-z]/) { $File::Find::pr

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
"John W. Krahn" <[EMAIL PROTECTED]> writes: > Harry Putnam wrote: >> >> "Charles K. Clarkson" <[EMAIL PROTECTED]> writes: >> >> > Harry Putnam said: >> > : >> > : Here is the problem: >> > : >> > : Summary run home made tools against only the >> > : uniq paths that might contain perl *.pm files.

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
"John W. Krahn" <[EMAIL PROTECTED]> writes: > "John W. Krahn" wrote: >> >> The initial value in $name{$File::Find::name} will be undef not zero so >> comparing it to zero will not work. >> >> if ( $name{ $File::Find::name }++ ) { > > Sorry, my mistake, it does work. Whew, for a minute t

Re: find uniq paths in @INC

2003-06-28 Thread John W. Krahn
"John W. Krahn" wrote: > > The initial value in $name{$File::Find::name} will be undef not zero so > comparing it to zero will not work. > > if ( $name{ $File::Find::name }++ ) { Sorry, my mistake, it does work. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL

Re: find uniq paths in @INC

2003-06-28 Thread John W. Krahn
Harry Putnam wrote: > > "Charles K. Clarkson" <[EMAIL PROTECTED]> writes: > > > Harry Putnam said: > > : > > : Here is the problem: > > : > > : Summary run home made tools against only the > > : uniq paths that might contain perl *.pm files. > > > > Harry, that doesn't' make a bit of sense. >

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
"Charles K. Clarkson" <[EMAIL PROTECTED]> writes: > Harry Putnam said: > : > : Here is the problem: > : > : Summary run home made tools against only the > : uniq paths that might contain perl *.pm files. > > Harry, that doesn't' make a bit of sense. > Could you rephrase the question? You can

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
"SPENCERS" <[EMAIL PROTECTED]> writes: > Hello, Harry. > >Is this what you are looking for? Well it gives the right results. I think I'm making a mountain where there was only a molehill. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: find uniq paths in @INC

2003-06-28 Thread Harry Putnam
Harry Putnam <[EMAIL PROTECTED]> writes: > I've stumbled around with this before and someone posted something > that came close but still doesn't quite do what I want. > > Maybe it isn't important enough to get this involved with it. > > Here is the problem: > > Summary run home made tools against

RE: find uniq paths in @INC

2003-06-28 Thread Charles K. Clarkson
Harry Putnam said: : : Here is the problem: : : Summary run home made tools against only the : uniq paths that might contain perl *.pm files. Harry, that doesn't' make a bit of sense. Could you rephrase the question? Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mo

RE: find uniq paths in @INC

2003-06-28 Thread SPENCERS
-Original Message- From: SPENCERS [mailto:[EMAIL PROTECTED] Sent: Saturday, June 28, 2003 12:37 PM To: Harry Putnam Subject: RE: find uniq paths in @INC Hello, Harry. Is this what you are looking for? #!/usr/bin/perl -w # list all of the perl modules installed use strict; use

Re: find uniq paths in @INC

2003-06-28 Thread Rob Dixon
Harry Putnam wrote: > I've stumbled around with this before and someone posted something > that came close but still doesn't quite do what I want. > > Maybe it isn't important enough to get this involved with it. > > Here is the problem: > > Summary run home made tools against only the uniq paths t

find uniq paths in @INC

2003-06-28 Thread Harry Putnam
I've stumbled around with this before and someone posted something that came close but still doesn't quite do what I want. Maybe it isn't important enough to get this involved with it. Here is the problem: Summary run home made tools against only the uniq paths that might contain perl *.pm files