jey has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
In order to always understand better Perl (for info I am using Perl 5.8.0 on linux). I have a little question.
I want to copy a file that is executable but when I use the File::Copy module it copies the file but not the permissions.
For example:
#!/usr/bin/perl -w use strict; use File::Copy qw/cp/; my $file = "/tmp/blubb"; my $target = "/tmp/bollux"; cp $file, $target or die "Oops: $!\n";
will copy the file blubb to the file bollux but if blubb is executable, bollux will not be!
Is this behaviour normal, is there anyway of changing it?
thanks in advance for help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Copy but...
by cored (Scribe) on Nov 18, 2003 at 00:01 UTC | |
|
Re: File::Copy but...
by pg (Canon) on Nov 18, 2003 at 00:31 UTC | |
|
Re: File::Copy but...
by simonm (Vicar) on Nov 18, 2003 at 00:16 UTC |