http://www.perlmonks.org?node_id=571307


in reply to subroutine passing array as named parameter

You're evaluating @_ in scalar context - which returns the number of items (1 in this case). Try forcing list context instead:
sub validate_record_length { my ($args) = @_; ...

-- zigdon

Replies are listed 'Best First'.
Re^2: subroutine passing array as named parameter
by sxmwb (Pilgrim) on Sep 05, 2006 at 20:00 UTC
    Thank you. I feel dumb now. I copied the code and for some reason dropped the parans. This solved the problem.

    Thanks for the help and I keep learning a lot from everyone.

    Seeker of knowledge

    sxmwb