mit Perl unter Unix Unterverzeichnisse erzeugen

Von: , Frage gestellt am Do, 17. Aug 2000

Hi!

Wie kann ich mit Perl unter Unix Unterverzeichnisse erzeugen?
(sowohl mit relativem als auch mit absolutem Pfad)

Vielen Dank!

Michael

1 Antworten zu dieser Frage

  1. Antwort von nach einer Stunde hilfreich
    Re: mit Perl unter Unix Unterverzeichnisse erzeuge

    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

Keine passende Antwort gefunden? Jetzt eigene Frage stellen!