Re: arbitrary sort

2014-03-25 Thread Uri Guttman
On 03/25/2014 11:41 AM, Jim Gibson wrote: On Mar 25, 2014, at 7:56 AM, shawn wilson wrote: Thanks (y'all). Though, I like this one best I think. BTW, Jim's isn't exactly correct: my @keys = qw( foo bar second baz first third ); my %primary = ( second => 1, first => 1, third => 1); And then

Re: arbitrary sort

2014-03-25 Thread Jim Gibson
On Mar 25, 2014, at 7:56 AM, shawn wilson wrote: > Thanks (y'all). Though, I like this one best I think. > > BTW, Jim's isn't exactly correct: > my @keys = qw( foo bar second baz first third ); > > my %primary = ( second => 1, first => 1, third => 1); > > And then the output becomes: > Sorted

Re: arbitrary sort

2014-03-25 Thread Jim Gibson
On Mar 25, 2014, at 6:55 AM, shawn wilson wrote: > i want to sort an array for certain key words first and then alphabetically. > > my @foo = qw/foo bar baz first second third/; > > foreach my $i (sort {$a cmp $b} @foo) { > print "$i\n"; > } > > How do I make 'first', 'second', and 'third' c

Re: arbitrary sort

2014-03-25 Thread shawn wilson
Thanks (y'all). Though, I like this one best I think. BTW, Jim's isn't exactly correct: my @keys = qw( foo bar second baz first third ); my %primary = ( second => 1, first => 1, third => 1); And then the output becomes: Sorted: first, second, third, bar, baz, foo Which isn't correct. On Tue, M

Re: arbitrary sort

2014-03-25 Thread Shawn H Corey
On Tue, 25 Mar 2014 09:55:25 -0400 shawn wilson wrote: > i want to sort an array for certain key words first and then > alphabetically. > > my @foo = qw/foo bar baz first second third/; > > foreach my $i (sort {$a cmp $b} @foo) { > print "$i\n"; > } > > How do I make 'first', 'second', and '

Re: arbitrary sort

2014-03-25 Thread Shlomi Fish
Hi Shawn, On Tue, 25 Mar 2014 09:55:25 -0400 shawn wilson wrote: > i want to sort an array for certain key words first and then alphabetically. > > my @foo = qw/foo bar baz first second third/; > > foreach my $i (sort {$a cmp $b} @foo) { > print "$i\n"; > } > > How do I make 'first', 'secon

arbitrary sort

2014-03-25 Thread shawn wilson
i want to sort an array for certain key words first and then alphabetically. my @foo = qw/foo bar baz first second third/; foreach my $i (sort {$a cmp $b} @foo) { print "$i\n"; } How do I make 'first', 'second', and 'third' come before the rest? (I'm actually dealing with a hash) -- To unsub

Re: Brand New

2014-03-25 Thread Alek Trishan
Try it without /search On March 25, 2014 7:26:46 AM EDT, Mike Flannigan wrote: > >Howdy, > >I get a 404 Not Found when I go to that link. > >You can use Perl as a browser, but it's not >beginner material and Perl generally does not >do simple browsing as well as a browser. > >When you see "T

Re: Brand New

2014-03-25 Thread Mike Flannigan
Howdy, I get a 404 Not Found when I go to that link. You can use Perl as a browser, but it's not beginner material and Perl generally does not do simple browsing as well as a browser. When you see "This site requires Javascript", click on "options" in the lower right, go to the bottom of the l