my $string= ' ' x 2**19; $string= ''; #### length( $string )= 2**19; # Doesn't work #### open NUL, "<", File::Spec->devnull(); sysread( NUL, $string, 2**19-length($string), length($string) ); close NUL; #### sysread( STDOUT, $string, 2**19 ); #### sub grow { sysread( DATA, $_[0], $_[1] ); } __DATA__