in reply to How to use chmod u +x in perl

Basically, you need to stat() the file to get its mode and then do a binary OR with 0100 (which I think is u+x) and then chmod $mode, $filename;
my $mode = (stat($filename))[2]; my $new_mode = $mode | 0100; chmod $mode, $filename);

Replies are listed 'Best First'.
Re^2: How to use chmod u +x in perl
by Anonymous Monk on Nov 25, 2013 at 09:53 UTC
    A few typos crept into that answer, but I'm sure you'll spot them...