SPUG: Sorting the contents of a scalar?

Matt Terich matt.terich at gmail.com
Mon Feb 26 15:29:13 PST 2007

sort works on lists. you'll need to split that data first.

sort( split(/\s/,$hash{$value}))

or something like that

star wars joke goes here

On 2/26/07, Atom Powers <atom.powers at gmail.com> wrote:
> This seems like it should be so easy; but I can't find anything that
> would tell me why this doesn't work or how to do it correctly.
> sort( qw/$hash{$value}/ )
> Where $hash{$value} is something like "mary jane joe bob".
> Any ideas?
> --
> --
> Perfection is just a word I use occasionally with mustard.
> --Atom Powers--
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>      POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>     MEETINGS: 3rd Tuesdays
>     WEB PAGE: http://seattleperl.org/


More information about the spug-list mailing list