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

Re: perl and sudo basic question

by Argel (Prior)
on Jul 09, 2007 at 23:49 UTC ( [id://625733]=note: print w/replies, xml ) Need Help??


in reply to perl and sudo basic question

Based on the output $su->sudo_run is returning a Hash reference and you cannot print the contents of the hash the way you are trying. For debuggin purposes try adding the following:

After use Sudo:

use Data::Dumper;

And then replace your line 15 (print $result) with the following:

print Data::Dumper->Dump([$result],['result']);

That should show you what is in the hash.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-19 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found