Help for this page
my @decoded = unpack '...', substr $bigscalar, $offset, $size;
substr( $bigscalar, $offset, $size ) = pack '...', @newValues;
my $replacement = pack '...', @newValues;
substr( $bigScalar, $offset, length $replacement ) = $replacement;
## Create a scalar
perl> $bigScalar = 'the quick brown fox jumps over the laxy dog';;
## The typo is now corrected.
perl> print $bigScalar;;
the quick brown fox jumps over the lazy dog
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (376 votes). Check out past polls.