in reply to Re^2: Compare two file text input, compare it, replace and write new file
in thread Compare two file text input, compare it, replace and write new file
another question: is it OK, if I used hash array my "data" (DFILE) on that program contain about 5000 lines ?while ( <SFILE> ) { chomp my @words = split /(?=\\)/; for my $word ( @words ) { $word = $words{ $word } if exists $words{ $word }; } print TFILE "@words\n<br>"; }
my %words; while (<DFILE>) { chomp; my ($key, $val) = split /:/; $words{$key} = $val; };
|
|---|