8 use Config qw(%Config);
10 $ENV{PERL_TEST_MEMORY} >= 2
11 or skip_all("Need ~2Gb for this test");
13 or skip_all("Need 64-bit pointers for this test");
18 # ${\2} to defeat constant folding, which in this case actually slows
20 my $x=" "x(${\2}**31+20);
22 is pos $x, 2147483643, 'setting pos on large string';
24 is pos $x, 2147483653, 'reading lvalue pos after setting it > 2**31';
25 is scalar(pos $x), 2147483653, 'reading it with pos() in rvalue context';