switching with for idiom

for ($foo) {
return 1 if $_ == 1;
return 2 if $_ == 2;
return $_;
}

Published: 2010-11-30(Tue) 01:25