Re: 'touch' from setgid-perlscript
Richard Kettlewell wrote:
> >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.
Better use ">>FILE". It won't truncate the file if it already
exist.
Thanks,
Peter
--
Peter Tobias EMail:
Fachhochschule Ostfriesland tobias@et-inf.fho-emden.de
Fachbereich Elektrotechnik und Informatik tobias@debian.org
Constantiaplatz 4, 26723 Emden, Germany
Reply to: