sub f1{ my ($zeroelement, $oneelement, $twoelement, $threeelement) =@_; print scalar(@_); ## prints number of elements -->4 ## each element is in the appropriate value, and $zeroelement is 9 $cp=1; $LOCAL_CODEPAGE =10; if ($a==1){ $LOCAL_CODEPAGE = $cp; break; } return $LOCAL_CODEPAGE = $a; print "\n"; } @3=(); print "\$LOCAL_CODEPAGE=$LOCAL_CODEPAGE: f1(@3,9,3,4,5): ".f1(@3,9,3,4,5)."\n";