NodXof has asked for the wisdom of the Perl Monks concerning the following question:
Several other returns are of the same form in this function and each returns a Hash. My return is just "1"; a string. This is an error. Thanks!sub saveAccountAccess { my $p = shift; my $input = $p->{'input'}; my $session = $p->{'session'}; my $error = {}; . . . if (defined $nickname and length($nickname) != 0) { # Check for duplicates error $duplications = &LookForDups($nickname, $p); if ($duplications){ return 'nick_name' => 1, } &updateNickname($nickname, $p);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returning Hash from subroutine of form 'var' => 1,
by Athanasius (Archbishop) on Jun 15, 2015 at 15:02 UTC | |
|
Re: Returning Hash from subroutine of form 'var' => 1,
by kroach (Pilgrim) on Jun 15, 2015 at 15:03 UTC | |
|
Re: Returning Hash from subroutine of form 'var' => 1,
by hippo (Archbishop) on Jun 15, 2015 at 15:04 UTC | |
by NodXof (Novice) on Jun 15, 2015 at 20:27 UTC |