basicdez has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl -w @BankIN = (1,2,3); @BankOUT = (4,4,4); use strict 'subs'; arrayX(\@BankIN, \@BankOUT); sub arrayX{ my($a1, $a2)=@_; my $BankCount = 0; my $arg = shift(@ARGV); print "$#a1\n"; while ($BankCount <= $#a1 ) { if ($a1[$BankCount] eq $arg) { $arg = $a2[$BankCount]; $BankCount = $#a1; } $BankCount++; } print "$arg\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why is this not finding my array value.
by chipmunk (Parson) on Jan 19, 2001 at 01:00 UTC | |
by basicdez (Pilgrim) on Jan 19, 2001 at 21:36 UTC | |
|
Re: Why is this not finding my array value.
by cat2014 (Monk) on Jan 19, 2001 at 00:53 UTC | |
by basicdez (Pilgrim) on Jan 19, 2001 at 21:36 UTC | |
|
Re: Why is this not finding my array value.
by lemming (Priest) on Jan 19, 2001 at 00:49 UTC | |
by c-era (Curate) on Jan 19, 2001 at 00:52 UTC | |
by basicdez (Pilgrim) on Jan 19, 2001 at 21:32 UTC |