Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Filtering very large files using Tie::File

by talexb (Canon)
on Nov 26, 2010 at 17:57 UTC ( #873904=note: print w/replies, xml ) Need Help??


in reply to Re^2: Filtering very large files using Tie::File
in thread Filtering very large files using Tie::File

If the data's tab delimited, you could split your incoming line on tabs

my @w = split(/\t/,$_);
and then build a key out of the first two fields and use that as your hash key
if ( !$seen{$w[0].$w[1]}++ ) {

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^4: Filtering very large files using Tie::File
by elef (Friar) on Nov 26, 2010 at 18:48 UTC
    As far as I can tell, that does exactly what my regex does. I guess I'll stick with the regex.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873904]
help
Chatterbox?
[oiskuu]: ... getlogin refers to tty owner; if you close STDIN, then getlogin returns undef. I get undef in my shell (running under X)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-06-23 19:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (554 votes). Check out past polls.