Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: perl and sudo basic question

by yelekeri (Novice)
on Jul 10, 2007 at 03:41 UTC ( [id://625754]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

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

    No recent polls found