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.)
In reply to Re^2: how to find differences between two huge files
by graff
in thread how to find differences between two huge files
by sayeevamsi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |