Hi,lists,

I have a small script,when it run,it generate much more lines and put them
into a file.
The code for printing I writed:

 map { print RESULT $_,":",$ips{$_},"\n" }
        sort { $ips{$b} <=> $ips{$a} } keys %ips;

Certainly, I can write that code with foreach style.
I want to know which method is more effective between foreach and map?

ps: the result file is very large,shown as below:

$ wc -l < loginIP.re.152
9260754


Thanks.

Reply via email to