Return to Snippet

Revision: 27490
at June 11, 2010 06:06 by heinz1959

Initial Code
#!/usr/bin/perl -wl


for $i (0 .. $#f) {
	$r=int rand ($i+1);
	@f[$i, $r][email protected][$r,$i] if ($i!=$r);

chomp @f;

print join $/, @f;

Initial URL

Initial Description
Need to "unsort" / randomize / scramble LINES in a text?
Copy source -> then TextMate Bundle Editor -> New Command -> select all in Command(s) -> paste source -> Input: Selected Text or Document -> Output: Replace Selected Text ...

Initial Title
Unsort Lines TextMate Command

Initial Tags

Initial Language