Hi!
Wie kann ich mit Perl unter Unix Unterverzeichnisse erzeugen?
(sowohl mit relativem als auch mit absolutem Pfad)
Vielen Dank!
Michael
Hi!
Wie kann ich mit Perl unter Unix Unterverzeichnisse erzeugen?
(sowohl mit relativem als auch mit absolutem Pfad)
Vielen Dank!
Michael
Auszug aus der Perl-Doku:
mkdir FILENAME,MODE
Creates the directory specified by FILENAME, with permissions specified by MODE (as modified by umask). If it succeeds it returns TRUE, otherwise it returns FALSE and sets $! (errno).
In general, it is better to create directories with permissive MODEs, and let the user modify that with their umask, than it is to supply a restrictive MODE and give the user no way to be more permissive. The exceptions to this rule are when the file or directory should be kept private (mail files, for instance). The perlfunc(1) entry on umask discusses the choice of MODE in more detail.
Bsp:
mkdir ("~/verz",octal(755)); #relativ zu Home
mkdir ("/verz",octal(755)); #absolut
mkdir („verz“,octal(755)); #absolut relativ
cu, holli