my $firstline = (`perl -MO=Deparse $0 2>nul`)[2]; print "\nThe first line of Perl code is:\n$firstline"; # first test: $x = sin / 25 ; # /; die "Bang! I'm dead!"; $y = time / 25 ; # /; die "I'm only pretending!"; #### The first line of Perl code is: $x = sin / 25 ; # /; Bang! I'm dead! at D:\Perl\dl\debug\testsource.pl line 19.