use strict;
use warnings;
use Sys::Mmap;
my $string;
open my $fh, '<', '/usr/share/dict/words' or die $!;
Sys::Mmap::mmap( $string, 0, MAP_SHARED, PROT_READ, $fh );
while( $string =~ m/^(wal.*)$/mg ) {
print $1, "\n";
}
Sys::Mmap::munmap( $string ) or die "munmap: $!";
close $fh;
####
variable is not a string at ./mytest.pl line 17.
####
if(SvTYPE(var) != SVt_PV) {
croak("variable is not a string");
return;
}