in reply to Re: how to find differences between two huge files
in thread how to find differences between two huge files
you could do:m[^ ( [^|]+ ) \| ]x and $current{ $1 } = $_ while <CURRENT>; ... if( m[^ ( [^|]+ ) \| ]x and exists $current{ $1 } ) {
It's a bit more typing, but depending on the string lengths and quantities involved, it might end up running a little faster (and the extra letters spelling out the function names may help to provide a bit of explanation about what's actually going on).(my $e=index($_,"|"))>0 and $current{substr($_,0,$e)}=$_ while <CURREN +T>; ... if((my $e=index($_,"|"))>0 and exists $current{substr($_,0,$e)) {
(I guess the scope of the first temporary "$e" will be wider than necessary, given the absence of curly brackets for that "while" loop, but just a little more typing would fix that as well.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to find differences between two huge files
by BrowserUk (Patriarch) on Jan 25, 2008 at 11:44 UTC |