Start with the library. The intro to data structures is excellent. It would be easy to make it a list of lists just through your file into an array and then search by position.
@C = <INFILE>;
$start = 0;
foreach $foo(@C) {
until ($start > $#@C)
if($foo
$start=~/joe || bob/)
{push (@NewUser,$foo
$start);
$start++;
push (@NewUser,$foo
$start);
$start++;
push (@NewUser,$foo
$start);
$start++;
push (@NewUser,$foo
$start);
$start++;}
$start++;}
{push (@AllUsers,
@NewUser;}
you get
@AllUsers = (
'joe','2','9','8',
'bob','4','u','2',
);
or a hash where Joe is the key and the value is a list of the next three lines. Just my little thoughts.
Gandalf tea Wednesday.