Re: [OT] Help with Perl Script

2010-04-23 Thread Dave Cross
On 21 April 2010 09:21, Dan Track dan.tr...@gmail.com 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

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 tests

[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

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 dan.tr...@gmail.com 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

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 Dan Track
On Wed, Apr 21, 2010 at 1:30 PM, Norman Gaywood ngayw...@une.edu.au 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

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 ngayw...@une.edu.au 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

Re: [OT] Help with Perl Script

2010-04-21 Thread Norman Gaywood
On 22 April 2010 01:26, Norman Gaywood ngayw...@une.edu.au 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 ngayw...@une.edu.au wrote: On Wed, Apr 21, 2010 at 09:21:30AM +0100, Dan Track wrote: hashes. It's after this that I'm

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 :) Basically to

Re: [OT] Help with Perl Script

2010-04-21 Thread Dan Track
On Wed, Apr 21, 2010 at 4:41 PM, Norman Gaywood ngayw...@une.edu.au wrote: On 22 April 2010 01:26, Norman Gaywood ngayw...@une.edu.au 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 ngayw...@une.edu.au wrote: On Wed, Apr 21,

Re: [OT] Help with Perl Script

2010-04-21 Thread Jake Peavy
On Wed, Apr 21, 2010 at 4:21 AM, Dan Track dan.tr...@gmail.com 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

Re: [OT] Help with Perl Script

2010-04-21 Thread Jake Peavy
On Wed, Apr 21, 2010 at 12:34 PM, Jake Peavy djstu...@gmail.com wrote: On Wed, Apr 21, 2010 at 4:21 AM, Dan Track dan.tr...@gmail.com 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