Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Replacing original hash with modified hash returned from subroutine

by shadowsong (Pilgrim)
on Oct 28, 2017 at 21:12 UTC ( [id://1202242]=note: print w/replies, xml ) Need Help??


in reply to Replacing original hash with modified hash returned from subroutine

Hi CommaSplice,

Your issue is the first line of your trivia subroutine.

$starship_ref isn't being assigned anything – the call to shift returns a scalar that you're attempting to assign to a list...

Change:

my ($captains, $starship_ref) = shift;

to:

my $captains = shift; my $starship_ref = shift;

Hope that helps.

Best Regards,
Shadowsong

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-25 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found