Algorithm::Combinatorics is good for this (though it sometimes takes trial and error to work out which of it algorithms you need), and it generates these kinds of patterns very efficiently:
#! perl -slw
use Algorithm::Combinatorics qw[:all];
my $iter = combinations( [0..9], 4 );
print "@$_" while $_ = $iter->next;
C:\test>4of10Combinations.pl | wc -l
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
In the absence of evidence, opinion is indistinguishable from prejudice.
Suck that fhit