1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!./perl -p BEGIN { print "1..3\n"; *ARGV = *DATA; } END { print "ok 3\n"; } s/^not //; __DATA__ not ok 1 not ok 2