in reply to can i pass an array as an argument during a sub routine call???
That is fine so long as you only wish to pass one array (or hash) and it is the last parameter. If you wish to pass more than one array (or hash) you need to pass them by reference:
doSub (\@array1, \%hash1, \@array2, ...); sub doSub { my ($array1Ref, $hash1Ref, $aray2Ref, ...) = @_; my $value = $array1Ref->[$index]; $value = $hash1Ref->{key}; ... }
|
|---|