iphony has asked for the wisdom of the Perl Monks concerning the following question:
for my $i (0 .. $#unique_manufacturer_model) { for my $j (0 .. $#unique_terminal_id) { if ( (@unique_manufacturer_model->[$i][9] eq @unique_terminal_ +id->[$j][9]) and (@unique_manufacturer_model->[$i][10] eq @unique_ter +minal_id->[$j][10]) ) { if (@unique_manufacturer_model->[$i][12] eq "") { @unique_manufacturer_model->[$i][12] = 1; } else { @unique_manufacturer_model->[$i][12]++; } } } } &checkpoint(9,10,12,@unique_manufacturer_model); &checkpoint(10,11,12,@unique_manufacturer_model_version); And here's the output: [root@localhost cron]# perl probe_cron.pl 1) Nokia | N77 | 5 2) Nokia | Nokia N96 | 36 3) | | 1 1) N77 | [V 3.0747.2.0.3|22-11-2007|RM-194] | 5 2) Nokia N96 | [10.045|31-07-08|RM-247|(C) Nokia N96] | 36 3) Nokia N96 | [v 0.0804.X.0.032|06-02-08|RM-247|(C) Nokia N96] | 4) | [] | 1 5) N77 | [V 3.0827.22.0.1-RD|04-07-2008|RM-194] |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Updating 1 array affects the other array
by llancet (Friar) on Sep 02, 2008 at 06:36 UTC | |
|
Re: Updating 1 array affects the other array
by wfsp (Abbot) on Sep 02, 2008 at 07:31 UTC | |
|
Re: Updating 1 array affects the other array
by Anonymous Monk on Sep 02, 2008 at 06:50 UTC | |
by iphony (Acolyte) on Sep 02, 2008 at 08:21 UTC | |
by Anonymous Monk on Sep 02, 2008 at 08:42 UTC | |
|
Re: Updating 1 array affects the other array
by llancet (Friar) on Sep 02, 2008 at 10:47 UTC | |
by iphony (Acolyte) on Sep 02, 2008 at 12:24 UTC | |
by JadeNB (Chaplain) on Sep 02, 2008 at 14:29 UTC |