in reply to Re: Re: The @$ array construct
in thread The @$ array construct

Try this on for size:
  1. Build a hash that maps userid to servername.
  2. Iterate through the rows in your excel workbook. This will give you an array reference, each element of which is an array reference.
  3. Grab the userid element (let's say it's column F) and server (in G).
  4. Do a compare and you're done!
my %User_Server = MapUsersToServer(); my $Rows = $worksheet->SomeMethodICan'tRemember(); foreach my $row (@$Rows) { my ($user_id, $server) = ($row->[5], $row->[6]); if ($User_Server{$user_id} ne $server) { # Do something useful here. } }
I hope that helps.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Re3: The @$ array construct
by blackadder (Hermit) on Jun 29, 2003 at 20:44 UTC
    ($row->5, $row->6); did it for me,....Many thanks
    cheers.