Something like this
my @substrrefs = map { [ \substr( $text, $_ ) , \substr( $text, 0, $_ ) ] } 0 .. (-1+length $text); my $bwt = join ... sort { $$a[0].$$a[1] cmp $$b[0].$$b[1] } @substrrefs;
In reply to Re: Is it possible to make reference to substrings and sort them?
by Anonymous Monk
in thread Is it possible to make reference to substrings and sort them?
by spooknick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |