my $fmt= "I"; my $iBytes= length( pack $fmt, $fmt ); my $pBytes= length( pack "P", $fmt ); if( $iBytes != $pBytes ) { die "Your pointers are $pBytes bytes, ints are $iBytes"; } my $pointer= pack $fmt, 0x78000000; my $bytes= 4*1024; # Set to number of bytes to copy my $copy= unpack "P$bytes", $pointer;