Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Replacing original hash with modified hash returned from subroutine

by shadowsong (Monk)
on Oct 28, 2017 at 21:12 UTC ( #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
Node Status?
node history
Node Type: note [id://1202242]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2019-05-23 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (142 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!