This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
One-argument syswrite
[perl5.git] / t / lib / sample-tests / shbang_misparse
CommitLineData
6e5a998b
MS
1#!/usr/bin/perl-latest
2
3# The above #! line was misparsed as having a -t.
4# Pre-5.8 this will simply cause perl to choke, since there was no -t.
5# Post-5.8 taint warnings will mistakenly be on.
6
7print "1..2\n";
8print "ok 1\n";
9my $warning = '';
10$SIG{__WARN__} = sub { $warning .= $_[0] };
11eval("#" . substr($0, 0, 0));
12print $warning ? "not ok 2\n" : "ok 2\n";