in reply to Null-stripping performance
I'd recommend:
or$value = unpack "x$index Z4", $string;
$value = substr($string, $index, 4); $value =~ y/\0//d;
In Section
Seekers of Perl Wisdom