N
Niko
Hi ,
I am writing script using multiple pattern matching.
I need to replace the $_ =~ few times.
Example:
sub xx {
open (TEMPF,"> $T_FILE");
while (<FILE>) {
$_ =~ $string; <== here is the problem
print TEMPF $_;
}
close (TEMPF);
}
##MAIN##
$string='s/(<RE>).*(<\/RE)/\1xxxx\2/g'; <== this pattern works fine
xx ();
The problem is that the $_ doesn't execute the pattern matching.
What am I doing wrong?
Thanks a lot,
I am writing script using multiple pattern matching.
I need to replace the $_ =~ few times.
Example:
sub xx {
open (TEMPF,"> $T_FILE");
while (<FILE>) {
$_ =~ $string; <== here is the problem
print TEMPF $_;
}
close (TEMPF);
}
##MAIN##
$string='s/(<RE>).*(<\/RE)/\1xxxx\2/g'; <== this pattern works fine
xx ();
The problem is that the $_ doesn't execute the pattern matching.
What am I doing wrong?
Thanks a lot,