It works for me for longer strings:
#! /usr/bin/perl use warnings; use strict; use feature qw{ say }; my $long_string = 'ab' x 3e9; my $pos = index $long_string, 'ba', 6e9 - 4; say $pos; __END__ 5999999997
In reply to Re: INDEX limits
by choroba
in thread INDEX limits
by clivehumby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |