Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/t/lib/sample-tests/shbang_misparse

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/usr/bin/perl-latest

# The above #! line was misparsed as having a -t.
# Pre-5.8 this will simply cause perl to choke, since there was no -t.
# Post-5.8 taint warnings will mistakenly be on.

print "1..2\n";
print "ok 1\n";
my $warning = '';
$SIG{__WARN__} = sub { $warning .= $_[0] };
eval("#" . substr($0, 0, 0));
print $warning ? "not ok 2\n" : "ok 2\n";

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].