open(IMGDB, "$img_db"); # Open db for reading @imgarray=<IMGDB>; close (IMGDB); my @matchingOptions = grep{ /\Q$search\E/i }, @imgarray; foreach my $imgline (@matchingOption) { my ($img_name,$img_desc) = split /\|/, $imgline; print <<End_of_head; <option value='$img_name'>$img_desc</option> End_of_head } } ... for my $imgline ( @matchingOptions ) { # Do things; }
In reply to Re: Array Question
by BrowserUk
in thread Array Question
by lisaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |