Lawrence Statton wrote:
Hello group:
In attempting to set $file2 to the same mode as $file1 I do this:
my $mode = (stat($file1))[2];
chmod $mode, $file2;
That code does the trick but I just want to make sure of:
1)
I see in perldoc -f chmod it talks about oct() but if I'm using stat's
mode it
> Hello group:
>
> In attempting to set $file2 to the same mode as $file1 I do this:
>
>my $mode = (stat($file1))[2];
>chmod $mode, $file2;
>
> That code does the trick but I just want to make sure of:
>
> 1)
> I see in perldoc -f chmod it talks about oct() but if I'm using stat's
> mo
Hello group:
In attempting to set $file2 to the same mode as $file1 I do this:
my $mode = (stat($file1))[2];
chmod $mode, $file2;
That code does the trick but I just want to make sure of:
1)
I see in perldoc -f chmod it talks about oct() but if I'm using stat's
mode it should be safe not to us