Cloning File Protection?

Larry Wall lwall at jpl-devvax.JPL.NASA.GOV
Sat Oct 6 09:42:25 AEST 1990


In article <277 at talarian.UUCP> scott at talarian.UUCP (Scott Weitzenkamp) writes:
:   Now I can do what I want:
: 
: chmod `getmod old_foo.c` new_foo.c
: 
:   I have a feeling this is probably easy to do in Perl, but I not
: really interested in a Perl solution because I cannot guarantee that
: our customers will have Perl (I suppose I could put Perl on our
: product tape, though).  

Yes, it's certainly easier in Perl:

	chmod (stat("old_foo.c"))[2], "new_foo.c";

You have the added advantage of not spawning two processes per file.

I would recommend you put Perl on your product tape.  Others have done this--
talk to Tom Christiansen of Convex in particular.  You can even go as far
as to pre-compile it for them, or at least supply a ready-made config.sh.
They'll be really impressed!

I'm not at all biased, of course...    :-)

Larry Wall
lwall at jpl-devvax.jpl.nasa.gov



More information about the Comp.unix.questions mailing list