this is by far the UGLIEST function i have seen. the flow control is wretched.... but its a beautiful fault in its own "crack in the liberty bell" sorta way
poo ( [1..4], ["goo", "doo", "moo"], [6..9] ); sub poo { my($first, $second, $third) = @_; my @array = @{$second}; my $second = shift(@array); my $length = length($second); print("@array" , " $second", " $length\n"); @array = @{$first}; my $first = shift(@array); my $length1 = length($first); print("@array", " $first", " $length1\n"); @array = @{$third}; my $third = shift(@array); my $length2 = length($third); print("@array", " $third", " $length2\n"); my $result = $length + $length1 + $length2; print("$result\n"); }
no indents..... no comments... completely unmaintainable... but complete. only thing i have to ask now, is what suggestion would someone make to incorporate a loop to go thru. would it call for @_ [ $index ] and then increasing it throughout the loop until it returns undef?
In reply to Re^2: Dereferenced Arrays
by SirDonkeyPunch
in thread Dereferenced Arrays
by SirDonkeyPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |