This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove full stop in the 'try' feature heading
[perl5.git] / t / op / mydef.t
CommitLineData
9a0b91eb 1#!./perl -w
59f00321
RGS
2
3BEGIN {
4 chdir 't' if -d 't';
1c25d394 5 require './test.pl';
624c42e2 6 set_up_inc('../lib');
59f00321
RGS
7}
8
9a0b91eb 9use strict;
59f00321 10
7fba2966
FC
11eval 'my $_';
12like $@, qr/^Can't use global \$_ in "my" at /;
9a0b91eb 13
07319fdb
TK
14{
15 # using utf8 allows $_ to be declared with 'my'
16 # GH #18449
17 use utf8;
18 eval 'my $_;';
19 like $@, qr/^Can't use global \$_ in "my" at /;
20}
21
22done_testing;