in reply to How to extract from the array...exemple txt file:

#!/usr/bin/perl -naF/,/ $seen{$F[3]}->{$F[4]}++ if defined $F[3] and defined $F[4]; END { while(($k,$v) = each %seen) { print "$k has accessed $k2 $v2 tim +es.\n" while ($k2,$v2) = each %$v } }
^_^

Update: The folks in the chatterbox made me itchy. Golfing time anyone? (Mostly I just didn't want to be beaten out by use of the propositions I mentioned in CB myself.. ^_^)
#!/usr/bin/perl -naF/,/ $seen{"@F[4,3]"}++;END{@u;print"@u has accessed $s $t times.\n"while($ +_,$t)=each%seen,($s,@u)=split}
____________
Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: How to extract from the array...exemple txt file:
by mt2k (Hermit) on May 22, 2002 at 00:38 UTC
    Lol, just a little hint on how to use this one.
    (You know, for those not as smart like me):

    script.pl info.dat OR perl -naF/,/ script.pl info.dat

    where script.pl => Name of The Script
    where info.dat => Name of File Containing Data

    The second way of executing the script in required on Win32 machines :)