Re: doubt in pattern matching using variable

2003-02-05 Thread R. Joseph Newton
kasi ramanathen wrote: > $t="perl"; > while($ln=~m/$t/g) > { > print "it matches.."; > } > Hi Kasi, The part above shoul;d work, because this does: #!/usr/bin/perl -w use strict; my $Test = "Hi"; my $Greeting = "Hi, there. How are you?"; if ($Greeting =~ /$Test/) { print "$Greeting\n";

doubt in pattern matching using variable

2003-02-05 Thread kasi ramanathen
hi friends, i have a problem in work i want to use a variable in the place of pattern to be matched, but i don't know how? but some great brain some ware in the world will be knowing it. hear i explain the program, when i use the patter i get the right output when i store it in variable t and

Re: doubt in pattern matching using variable

2003-02-05 Thread Rob Dixon
Kasi ramanathen wrote: > hi friends, > > i have a problem in work i want to use a variable in the place of > pattern to be matched, but i don't know how? but some great brain > some ware in the world will be knowing it. > > hear i explain the program, when i use the patter i get the right > output

doubt in pattern matching using variable

2003-02-05 Thread kasi ramanathen
hi friends, i have a problem in work i want to use a variable in the place of pattern to be matched, but i don't know how? but some great brain some ware in the world will be knowing it. hear i explain the program, when i use the patter i get the right output when i store it in variable t and