#!/usr/bin/perl my $pad = 100_000_000; my $s = 'a' x $pad; $s .= 'qq was here'; $s .= 'b' x $pad; print substr( $s, $pad, 10 ), "\n"; # qq was here