Dear all,
I am truly bewildered as to why I can't get this
script to do what I want. Namely, to get the
multiline match. Please help!!!! see section of code
surrounded by ######## for question area
sample input:
M0011
XYZabcdefh
#!C:/perl/bin -w
die "Usage perl qup.pl <input> <output>" unless @ARGV
== 2;
my $in = $ARGV[0];
my $out = $ARGV[1];
open(I, "$in");
open(O, ">$out");
while (<I>) {
s/^ +//gi;
###below, I think I count for M0011 in $1
###then, i thought by using the /m modifier,
###i could but a caret after the \n
###this doesn't work for me, please help
########
$_ =~ s/^(M\d+)\n^(.*)/A $1\nB $2/mi;
########
print O "$_";
}
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]