Leser: 16
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl -w use strict; use warnings; use utf8; use Time::localtime; my $filename = "test_protokoll.txt"; open(my $fh, ">>:encoding(UTF-8)", $filename) or die ("Can't open report-file: ".$filename." ($!)\n"); printf $fh "current: %02d-%02d-%04d - %02d:%02d\n", localtime->mday, localtime->mon + 1, localtime->year + 1900, localtime->hour, localtime->min; close $fh;
Quoteperl test_perl.bat
QuoteC:\Windows\system32>rem C:\strawberry\perl\bin\perl.exe C:\Install\TaskControlle
r\test_script\test_perl.bat
C:\Windows\system32>perl test_perl.bat
Can't open perl script "test_perl.bat": No such file or directory
C:\Windows\system32>pause
Drücken Sie eine beliebige Taste . . .
QuoteC:\Windows\system32>rem C:\strawberry\perl\bin\perl.exe C:\Install\TaskControlle
r\test_script\test_perl.bat
C:\Windows\system32>C:\strawberry\perl\bin\perl.exe test_perl.bat
Can't open perl script "test_perl.bat": No such file or directory
C:\Windows\system32>pause
C:\strawberry\perl\bin\perl.exe C:\Install\TaskController\test_script\test_perl.bat
QuoteC:\Windows\system32>C:\strawberry\perl\bin\perl.exe C:\Install\TaskController\te
st_script\test_perl.bat
Backslash found where operator expected at C:\Install\TaskController\test_script
\test_perl.bat line 1, near "strawberry\"
Backslash found where operator expected at C:\Install\TaskController\test_script
\test_perl.bat line 1, near "perl\"
Backslash found where operator expected at C:\Install\TaskController\test_script
\test_perl.bat line 1, near "bin\"
Backslash found where operator expected at C:\Install\TaskController\test_script
\test_perl.bat line 1, near "Install\"
Backslash found where operator expected at C:\Install\TaskController\test_script
\test_perl.bat line 1, near "TaskController\"
Backslash found where operator expected at C:\Install\TaskController\test_script
\test_perl.bat line 1, near "test_script\"
syntax error at C:\Install\TaskController\test_script\test_perl.bat line 1, near
"strawberry\"
Execution of C:\Install\TaskController\test_script\test_perl.bat aborted due to
compilation errors.
QuoteC:\Windows\system32>perl 'C:\Install\TaskController\test_script\test_perl.bat'
Can't open perl script "'C:\Install\TaskController\test_script\test_perl.bat'":
Invalid argument
Quotecd "C:\Install\TaskController\test_script\"
perl "test_perl.pl"
pause
perl meine_perl-Datei.pl
1
2
cd "C:\Install\TaskController\"
perl TaskControl.pl --to="test@example.de" --service=Tomcat7 --logmail