Re: [OT] Help with Perl Script

2010-04-23 Thread Dave Ihnat
On Fri, Apr 23, 2010 at 09:06:45AM +0100, Dave Cross wrote: > I probably wouldn't use something _quite_ this cryptic in production code. Oh, that wouldn't be a problem *IF* you commented the he11 out of it and bracketed the code with "DON'T CHANGE THIS IF YOU DON'T UNDERSTAND IT" comments. IF tes

Re: [OT] Help with Perl Script

2010-04-23 Thread Dave Cross
On 21 April 2010 09:21, Dan Track wrote: > Hi, > > I appreciate that this is off-topic and wholly understand if I don't > get an answer, although one would really appreciate it if I do get an > answer :) > > Basically to improve my perl scripting, I've given myself a challenge > where I would like

Re: [OT] Help with Perl Script

2010-04-21 Thread Jake Peavy
On Wed, Apr 21, 2010 at 12:34 PM, Jake Peavy wrote: > On Wed, Apr 21, 2010 at 4:21 AM, Dan Track wrote: > >> Hi, >> > > Hey > > >> I appreciate that this is off-topic and wholly understand if I don't >> get an answer, although one would really appreciate it if I do get an >> answer :) >> > > Can

Re: [OT] Help with Perl Script

2010-04-21 Thread Jake Peavy
On Wed, Apr 21, 2010 at 4:21 AM, Dan Track wrote: > Hi, > Hey > I appreciate that this is off-topic and wholly understand if I don't > get an answer, although one would really appreciate it if I do get an > answer :) > Can you please mark as OT in the subject next time? That way anyone not i

Re: [OT] Help with Perl Script

2010-04-21 Thread Dan Track
On Wed, Apr 21, 2010 at 4:41 PM, Norman Gaywood wrote: > On 22 April 2010 01:26, Norman Gaywood wrote: >> On Wed, Apr 21, 2010 at 04:12:06PM +0100, Dan Track wrote: >>> On Wed, Apr 21, 2010 at 1:30 PM, Norman Gaywood wrote: >>> > On Wed, Apr 21, 2010 at 09:21:30AM +0100, Dan Track wrote: >>> >>

Re: [OT] Help with Perl Script

2010-04-21 Thread jack craig
google is perl's best friend, google, 'perl sort arrays' ... good luck, jackc... On 04/21/2010 01:21 AM, Dan Track wrote: > Hi, > > I appreciate that this is off-topic and wholly understand if I don't > get an answer, although one would really appreciate it if I do get an > answer :) > > Basicall

Re: [OT] Help with Perl Script

2010-04-21 Thread Norman Gaywood
On 22 April 2010 01:26, Norman Gaywood wrote: > On Wed, Apr 21, 2010 at 04:12:06PM +0100, Dan Track wrote: >> On Wed, Apr 21, 2010 at 1:30 PM, Norman Gaywood wrote: >> > On Wed, Apr 21, 2010 at 09:21:30AM +0100, Dan Track wrote: >> >> hashes. It's after this that I'm stuck, I'm struggling to orde

Re: [OT] Help with Perl Script

2010-04-21 Thread Norman Gaywood
On Wed, Apr 21, 2010 at 04:12:06PM +0100, Dan Track wrote: > On Wed, Apr 21, 2010 at 1:30 PM, Norman Gaywood wrote: > > On Wed, Apr 21, 2010 at 09:21:30AM +0100, Dan Track wrote: > >> hashes. It's after this that I'm stuck, I'm struggling to order the > >> hash of hashes by uid and then print the

Re: [OT] Help with Perl Script

2010-04-21 Thread Dan Track
On Wed, Apr 21, 2010 at 1:30 PM, Norman Gaywood wrote: > On Wed, Apr 21, 2010 at 09:21:30AM +0100, Dan Track wrote: >> hashes. It's after this that I'm stuck, I'm struggling to order the >> hash of hashes by uid and then print the ordered list out? Can someone > [snip] >> foreach my $sorted ( sort

Re: [OT] Help with Perl Script

2010-04-21 Thread Norman Gaywood
On Wed, Apr 21, 2010 at 09:21:30AM +0100, Dan Track wrote: > hashes. It's after this that I'm stuck, I'm struggling to order the > hash of hashes by uid and then print the ordered list out? Can someone [snip] > foreach my $sorted ( sort { $HoH->{$a}{uid} cmp $HoH->{$b}{uid} } keys %HoH) cmp is a

Re: [OT] Help with Perl Script

2010-04-21 Thread Bruno Wolff III
On Wed, Apr 21, 2010 at 10:20:27 +0100, Dan Track wrote: > > Basically to improve my perl scripting, I've given myself a challenge > where I would like to order the users in the passwd file by uid, I > could do this in another language but I'm focused on improving my perl > scripting. The scrip

[OT] Help with Perl Script

2010-04-21 Thread Dan Track
Hi, I appreciate that this is off-topic and wholly understand if I don't get an answer, although one would really appreciate it if I do get an answer :) Basically to improve my perl scripting, I've given myself a challenge where I would like to order the users in the passwd file by uid, I could d

[OT] Help with Perl Script

2010-04-21 Thread Dan Track
Hi, I appreciate that this is off-topic and wholly understand if I don't get an answer, although one would really appreciate it if I do get an answer :) Basically to improve my perl scripting, I've given myself a challenge where I would like to order the users in the passwd file by uid, I could d