in reply to Search And Replace
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.#!/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
|
---|