Thread error line number (11 answers)
Opened by linuxCowboy at 2014-12-17 21:57

GwenDragon
 2014-12-20 09:35
#178854 #178854
User since
2005-01-17
14761 Artikel
Admin1
[Homepage]
user image
Würgaround in Perl: Zeile für #line in ein string-eval packen.
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
suse 5.010;

say 4711;

die if $ARGV[0] !~ /^\d+$/;
eval qq(#line $ARGV[0] !??.pl
warn 'ooohhh noooo!';);

say "42 is a lonely number";

ergibt:

x.pl 1001
4711
ooohhh noooo! at !??.pl line 1001.
42 is a lonely number

Last edited: 2014-12-20 09:36:56 +0100 (CET)

View full thread error line number