- or download this
substr( $q, 0, $k ) = reverse substr( $q, 0, $k );
- or download this
$q = reverse(substr($q, 0, $k)) . substr($q, $k);
- or download this
sub fannkuch {
use bytes; # This makes it fractionally faster
...
} while $index--;
$maxflips; # faster than an explicit return
}