Skip Menu |

This queue is for tickets about the Slurp CPAN distribution.

Report information
The Basics
Id: 39338
Status: new
Priority: 0/
Queue: Slurp

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.4
Fixed in: (no value)



Subject: Add to_hash?
It would be nice if Slurp would provide some kind to_hash function, maybe implemented like map {chomp; ($_,1) } to_array($filename ...) This kind of hash is useful for building existance maps, e.g. in the BEGIN block of a perl one-liner, and then check the file contents with this map: perl -MSlurp=to_hash -nle 'BEGIN { %h = to_hash "existsfile" } print if exists $h{$_}' somefile Instead of using the value "1" as the hash value, the occurrence count could be used instead, to have something similar like the "uniq -c" Unix command. Regards, Slaven