1#!perl -w 2 3# This test file does not use test.pl because of the involved way in which it 4# generates its TAP output. 5 6print "1..5\n"; 7 8my $file = "Run_switchF1.pl"; 9 10open F, ">$file" or die "Open $file: $!"; 11 12my $prog = <<'EOT'; 13#!./perl -anF[~#QQ\\xq'] 14 15BEGIN { 16 *ARGV = *DATA; 17} 18print "@F"; 19 20__DATA__ 21okx1x- use of alternate delimiter (lower case letter) in -F 22okq2q- use of alternate delimiter (lower case letter) in -F 23ok\3\- use of alternate delimiter (backslash) in -F 24ok'4'- use of alternate delimiter (apostrophe) in -F 25EOT 26 27# 2 of the characters toke.c used to use to quote the split parameter: 28$prog =~ s/QQ/\x01\x80/; 29# These 2 plus ~ # and ' were enough to make perl choke 30print F $prog; 31close F or die "Close $file: $!"; 32 33$count = 5; 34$result = "ok $count - complete test of alternate delimiters in -F\n"; 35print system ($^X, $file) ? "not $result" : $result; 36 37unlink $file or die "Unlink $file: $!"; 38