I haven't seen hello in the display OR the file /tmp/testfile has not been created. The "result" code is 256, what does it mean.
Normaly you would do my $realexitcode = $exitcode >> 8;, assuming that Sudo.pm uses system to execute sudo -- in this case this is 1. Looking into sudos man-page:
RETURN VALUES Upon successful execution of a program, the return value from sudo will simply be the return value of the program that was executed. Otherwise, sudo quits with an exit value of 1 if there is a configuration/permission problem or if sudo cannot execute the given command.

regards,
tomte


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


In reply to Re^6: perl and sudo basic question by Tomte
in thread perl and sudo basic question by yelekeri

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":