Hallo!
Ein Perl-Script soll das Directory ./bleh/foobar erstellen,
do.pl hineinkopieren, das ganze Directory rekursiv auch chmod 777
setzen, und ./bleh/foobar/file.txt erstellen, und diesem file.txt
dann den chmod 755 geben.
Leider passiert _nichts_!
NICHT einmal das Direcory "foobar" entsteht
Das Directory "bleh" ist chmod 777
-
Was mache ich falsch,
wie geht es richtig zu machen? -
Kann man sowas schöner lösen?
Ich habe das Gefühl diese Systembefehle sind unschön,
geht das mehr mit Perl Befehlen?
Oder spricht nichts gegen die Systembefehle?
Wie macht man das mehr Perl'ig?
Danke!
Aqua
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use CGI;
use strict;
my $cgi = CGI->new();
print "<html><head><title></title></head><body>";
exec("mkdir ./bleh/foobar");
exec("cp ./do.pl ./bleh/foobar");
exec("chmod -R 777 ./bleh/foobar");
exec("touch ./bleh/foobar/file.txt");
exec("chmod 755 ./bleh/foobar/file.txt");
print "DONE!<br><br>\n";
print "./ enthält:<br><br>\n\n";
print exec("ls");
print "</body></html>";