Optional parameters to regular expressions

Scott Penrose scottp at dd.com.au
Sun Oct 27 23:04:23 CST 2002


Hey Dudes,

Is there a way I can do something like this.

my $o = 'i';
print "got it" if ($str =~ /fred/$o);

ie: I want to be able to use a parameter to say it is case insensitive 
without having to use multiple if.

Scott
-- 
Scott Penrose
Open source developer
http://linux.dd.com.au/
scottp at dd.com.au

Dismaimer: Open sauce usually ends up never coming out (of the bottle).




More information about the Melbourne-pm mailing list