It's tough to figure out what you're trying to accomplish, since the "i"
modifier on the regex doesn't make any sense, but if you want the "g"
modifier to cause repeated passes on the string, then you need to place the
regex in its own loop.
Something like this:
while (<READ>)
{
print WRITE "'$`'," while /,/g;
}
If $_ contains 'one,two,three,four', then the output will be
'one','one,two','one,two,three',
Gary
-----Original Message-----
From: Veeraraju_Mareddi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 19, 2001 2:26 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: REGEX Premath $`
Why this is not working?Its ending with One test only, Its not working
entire the string
========================================================
open(READ,"c:\\SMTP.txt");open(WRITE,">>c:\\SMTP1.txt");
while(<READ>)
{
/,/gi;
print WRITE "'$`',";}
=======================================================
Thanx in Advance
Raju
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin