I have an application that calls a perl script, feeding it input over STDIN.

The perl script takes that input, processes it, and writes is as a change to an 
output file.

I use Path::Tiny, and this works ok,

        use Path::Tiny qw(path);

        my $newdata = $@;
        $newdata = (some processing);

        my $file = path('/home/aj/out.txt');
        my $data = $file->slurp_utf8;
        $data =~ s/some label.*/${1} $newdata} ]/x;
        $file->spew_utf8( $data );

The app runs as

        USER  = "appuser"
        GROUP = "appgroup"

and the perl-script's output file gets CHANGED to ownership by the SAME user & 
group, 'appuser'/'appgroup'.

How do I get that output file written with owndership by some OTHER user, eg

        USER  = "otheruser"
        GROUP = "othergroup"

?

AJ

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to