Thread error line number
(11 answers)
Opened by linuxCowboy at 2014-12-17 21:57
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) |