Thread eval (5 answers)
Opened by Gast at 2008-12-15 15:13

Gast Gast
 2008-12-15 15:13
#117253 #117253
Hallo,

nach langem Probieren habe ich trotzdem nicht herausgefunden weshalb das nicht funktioniert:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use warnings;
use strict;


eval { 
        open( my $fh, '<', 'hello' ) or die "$!";
        1;
} or { 
        print "world\n"; 
}


Code: (dl )
1
2
syntax error at ./test.pl line 11, near "}"
Execution of ./test.pl aborted due to compilation errors.


Wer kann mir einen Tipp geben?

View full thread eval