Help for this page
my $foo = "A string to work on."; my @substrs = map {\substr $foo, $_} 0 .. length($foo) - 1; my @sorted = sort { $$a cmp $$b } @substrs;
$ perl -e '$foo = "A short string\n"; $bar = \substr $foo, 0, 1; $$bar + = "The"; print $foo' The short string $