[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 'touch' from setgid-perlscript



>I have a perl-script which does a `/usr/bin/touch FILE`

Consider using this:

	open(TMP, ">FILE") || die "FILE: $!"; close TMP;

instead.  Life's too short to fork+exec just to create a file.

>I tried setting $GID=$EGID in several places to see if this makes a
>difference, but not.

The GID and EGID names only work if you say `use English;' - you have
to use $( and $) otherwise.  RTFM perlvar(1).

ttfn/rjk



Reply to: