On 25 Apr 2007 at 18:58, Somu wrote: > why wont the following work? > > $q = shift; > $p = "pass"; > if ( $q =~ m/$p/i ) { print 'match' } > > But it works on changing the $q and $p places..
Not sure but it works for me. #!/bin/perl use strict; use warnings; my $q = shift; my $p = "pass"; if ( $q =~ m/$p/i ) { print 'match' } >perl junk.pl pass match >perl junk.pl past > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/