File: profile.pl

package info (click to toggle)
libdata-sorting-perl 0.9-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 863; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
# t/profile.pl 

use Data::Sorting 'sorted_array';

my @text_chars = ( 'a' .. 'z', 'A' .. 'Z', 0 .. 9, ' ', ',', '.', '-' );
my @text_100 = map { join '', @text_chars[ map int(rand(@text_chars)), 1 .. int(rand(100)) ] } 1..100;

foreach ( 1 .. 500 ) {
  # sorted_array( @text_100 )
    sorted_array( @text_100, '-compare' => 'natural' )
  # sorted_array( @text_100, '-extract' => 'self' )
}