Re: Escaping a plus sign

2006-05-31 Thread Dr.Ruud
Paul Nowosielski schreef: > The > script will die if the is a + sign in the fields its parsing. perldoc -f quotemeta -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Escaping a plus sign

2006-05-31 Thread Ken Lehman
Is it the if ($MGMTCMNT =~ /$MGMTNM/) part that is tripping you up? I believe you could change it to if ($MGMTCMNT =~ /\Q$MGMTNM\E/) if you need to keep the regular expression. Another idea might be to change it to if ( ($start = index($MGMTCMNT, "$MGMTNM (")) > 0) { -Original Message-

Re: Escaping a plus sign

2006-05-30 Thread John W. Krahn
Paul Nowosielski wrote: > Dear All, Hello, > I have a perl script that runs nightly. It create a data feed. The script > will > die if the is a + sign in the fields its parsing. > > Here is the snippet: > > while (($PKEY, $MGMTCMNT, $manager_id, $MGMTNM, $UPDATE1, $UPDATE2) = > $sth->fetchro

Re: Escaping a plus sign

2006-05-30 Thread Paul Nowosielski
So would this be the correct solution: while (($PKEY, $MGMTCMNT, $manager_id, $MGMTNM, $UPDATE1, $UPDATE2) = $sth->fetchrow_array) { $comment = ""; # added to escape the plus sign $MGMTCMNT = ~ s/\+/\\+/g; $MGMTNM = ~ s/\+/\\+/g; if ($MGMTCMNT =~ /$MGMTN

Re: Escaping a plus sign

2006-05-30 Thread Anthony Ettinger
should probably escape the + sign with \+ $field =~ s/\+/\\+/g; On 5/30/06, Paul Nowosielski <[EMAIL PROTECTED]> wrote: Dear All, I have a perl script that runs nightly. It create a data feed. The script will die if the is a + sign in the fields its parsing. Here is the snippet: while (($PK