in reply to Search And Replace

This should work:

#!/usr/bin/perl -w use strict; my @users = ("Andrew", "Andrews", "Eric", "Andy", "Test"); my $param = "AnDr"; # what to search for foreach (@users) { print "$_\n" if /$param/i; } __OUTPUT__ Andrew Andrews
Update: Check the references that were mentioned in the above post. You need to read up on the m// operator. Also check this post for a list of some of the modifiers.

Update2: Your thread title was "Search and Replace. After you match the username to the search pattern, if you are wanting to replace it, you should also look into the s/// operator.