in reply to Re^2: perl and sudo basic question
in thread perl and sudo basic question

well, I found something interesting here when this script is ran with -W option :
<%23>: perl -W sud.pl Reference found where even-sized list expected at /apps/Perl/lib/site_ +perl/5.8.8/Sudo.pm line 85.
Sudo.pm seems to be fine and I never got any error messages during this package installation. Line #85 looks something like this:
83 if ($_sudo_stat_[5] != 0 ) 84 { 85 %ret = { 86 'error' => (sprintf 'Error: the sudo bin +ary "%s" is not set to group id = 0',$sudo) 87 }; 88 return \%ret; 89 }

Replies are listed 'Best First'.
Re^4: perl and sudo basic question
by Tomte (Priest) on Jul 10, 2007 at 06:20 UTC

    Just take the warning you get literaly: You are assigning a reference to a hash to a hash-variable - either replace the braces with parenthesis or declare ret as a scalar ($ret instead of %ret) -- don't forget to modify the return statement as well in the latter case.

    regards,
    tomte


    An intellectual is someone whose mind watches itself.
    -- Albert Camus