Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Setting chmod
Re: Setting chmod
Ben Morrow (firstname.lastname@example.org) wrote on VCCCIV September MCMXCIII in
** > > Why is the test.txt not chmodded to 0600 but to 0755
** > Because $sec is not a file name or a file handle. It's a good idea to
** > check if any file operation succeeded:
** > open(TEKST,">test.txt") or die $!;
** > chmod 0600,*TEKST or die $!;
** Don't use bare globs unless you really have to. They're very magic, and
** it's always safer to use a globref when you can:
** chmod 0600, \*TEKST or die $!;
So, in which way is 'chmod 0600, *TEKST' unsafe?
And why didn't you perlbug it?
# Count the number of lines; code doesn't match \w. Linux specific.
$;++;$*++;$;++;$*++;$;++;`$:$,$;$" $. >&$*`;
- » Use of "return" in place of "last" (newbie question)?
- — Previous thread in » PERL Discussions