Oct 9, 2012, 6:47 PM
I have no clue what you guys are talking about, but this is how i ended up doing it. I'll erase the code from here soon so ppl can't copy it.
Re: [Laurent_R] Finding data in arrays
Perl Newbie - 7 months of PERL basics.
#for loop to support looking into the array from the last entry
for ($i=$#studentID; $i>=0; $i--)
#pulls from the for loop looking for the search_key id within the studentID array
if ($studentID[$i] == $search_key)
#exits the loop
#if number is found, display the information for that array number.
print "\nStudent ID: \t@studentID[$i]";
print "First Name: \t@firstName[$i]";
print "Last Name: \t@lastName[$i]";
printf ("Amount Due: \t\$%1.2f", @amountDue[$i]);
#if not found, print name not found
print "\nName not found.\n";
(This post was edited by wyndcrosser on Oct 9, 2012, 7:34 PM)