Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks@selected_data = qw(13 76 90 13 77 100 76 300 13 65 400 74 89 34 65); @all_data = qw(1 5 2 8 12 87 13 76 98 77 89 90 11 65 43 74 43 32 34 67 +); $total = 0; foreach $sub_select (@selected_data) { foreach $sub_all (@all_data) { if($sub_select eq $sub_all) { $total++; } } } print "Count -> $total\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I get better approach to get solution
by kyle (Abbot) on Feb 13, 2007 at 04:31 UTC | |
|
Re: Can I get better approach to get solution
by BrowserUk (Patriarch) on Feb 13, 2007 at 04:34 UTC | |
by kyle (Abbot) on Feb 13, 2007 at 04:43 UTC | |
by BrowserUk (Patriarch) on Feb 13, 2007 at 04:45 UTC | |
by Anonymous Monk on Feb 13, 2007 at 05:08 UTC | |
|
Re: Can I get better approach to get solution
by dragonchild (Archbishop) on Feb 13, 2007 at 03:54 UTC | |
by Anonymous Monk on Feb 13, 2007 at 04:14 UTC |