sub encode { $_ = shift; s/((\D)\2+)/length($1).$2/eg; $_ } sub decode { $_ = shift; s/(\d+)(\D)/$2 x $1/eg; $_ }
In reply to Re^2: Compressing a text file using count of continous characters
by educated_foo
in thread Compressing a text file using count of continous characters
by nirvana4ol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |