Re: stat and chmod safety and prtability

2004-12-04 Thread JupiterHost.Net
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

Re: stat and chmod safety and prtability

2004-12-04 Thread Lawrence Statton
> 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

stat and chmod safety and prtability

2004-12-04 Thread JupiterHost.Net
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