my $str = '1234567812345678'; $str =~ s/(.{8})/reverse $1/eg; print "str: $str\n"; __output__ str: 8765432187654321
_________
broquaint
In reply to Re: Reversing chunks in a string (bits of byte in a bitstring)
by broquaint
in thread Reversing chunks in a string (bits of byte in a bitstring)
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |