Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Length of Array Passed as Reference

by jwkrahn (Abbot)
on Dec 10, 2020 at 01:57 UTC ( [id://11124920]=note: print w/replies, xml ) Need Help??


in reply to Length of Array Passed as Reference

Change:

my $ref_array = @_;

To:

my ($ref_array) = @_;

You are assigning the length of @_ to $ref_array, not the first element.

Replies are listed 'Best First'.
Re^2: Length of Array Passed as Reference
by Leudwinus (Scribe) on Dec 10, 2020 at 02:20 UTC

    Thank you for the quick reply!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11124920]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found