I don't /think/ it works with sort.  Someone correct me if I'm wrong,
but the block passed to sort has to return either a -1, 0, or 1, and I
think it needs to be consistent between two items (at least it should
be).

-Kurt

On Wed, Sep 17, 2003 at 04:12:07AM +0900, Mark J. Reed wrote:
> 
> On Wed, Sep 17, 2003 at 03:33:23AM +0900, Kurt M. Dresner wrote:
> > Try
> > 
> > -pe 'gsub!(/\B\w+\B/){$&.split(//).sort_by{rand}.join}
> > 
> > Shorter (and even cleaner too!)
> 
> It'll work with just sort instead of sort_by, won't it?
> Save three characters! :)
> 
> -Mark
> 
>======= End of Original Message =======<