Hi, Experts,
Here is a piece of my code:
The output:
I have tried all examples listed at this page:
None of above work. What am I missing here?
Many thanks.
Here is a piece of my code:
Code:
my $ret = `ls -l $pkg`;
chomp($ret);
print "1. \$ret = $ret\n";
my $mode = 0755;
my $cnt = chmod $mode, $pkg;
$ret = `ls -l $pkg`;
chomp($ret);
print "\$cnt = $cnt\n";
print "2. \$ret = $ret\n";
The output:
Code:
1. $ret = -rw-rw-rw- 1 Administrator None 22824288 Jun 6 04:21 C:/tmp/myfile.exe
$cnt = 1
2. $ret = -rw-rw-rw- 1 Administrator None 22824288 Jun 6 04:21 C:/tmp/myfile.exe
I have tried all examples listed at this page:
Code:
# examples:
$cnt = chmod 0755, 'foo', 'bar';
chmod 0755, @executables;
$mode = '0644'; chmod $mode, 'foo'; # !!! sets mode to
# --w----r-T
$mode = '0644'; chmod oct($mode), 'foo'; # this is better
$mode = 0644; chmod $mode, 'foo'; # this is best
None of above work. What am I missing here?
Many thanks.