in reply to <speed a major issue with below code also loosing data while writing in files>
You seem to be opening the output files multiple times in the foreach loop at the end, that will not only affect the running time but also can be the source of your data lost issue. So open the file before looping:
open my $fh, '>>', $filename; foreach my $uniquekey ( keys %myHash ) { ... print $fh ...; }; close($fh);
If this is a one time script then don't worry *much* about the following but if you have to maintain it over time consider the following:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: <speed a major issue with below code also loosing data while writing in files>
by Anonymous Monk on Jul 26, 2011 at 02:48 UTC | |
by bluescreen (Friar) on Jul 26, 2011 at 12:56 UTC | |
by Anonymous Monk on Jul 26, 2011 at 15:45 UTC | |
by bluescreen (Friar) on Jul 26, 2011 at 18:37 UTC | |
by Anonymous Monk on Jul 27, 2011 at 02:35 UTC | |
|