|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ /usr/bin/perl -c -W -Mstrict -
print "Hello";
- syntax OK
print "Hello";
print hello2
Unquoted string "test" may clash with future reserved word at - line 1.
Name "main::test" used only once: possible typo at - line 1.
- syntax OK
.
.
.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use warnings;
my $code='';
while (<>) {
if (/^_ _END_ _$/) {
if (defined eval $code) {
print "ok\n";
} else {
print "FEHLER!\n";
}
$code = '';
} else {
$code .= $_;
}
}
1
2
3
4
5
6
7
8
9
10
while (1){
local $/;
eval <>;
if ($@) {
print "Das war ok!\n";
} else {
print "Das gab einen Fehler:\n$@";
}
<>
}
|< 1 2 >| | 14 Einträge, 2 Seiten |