RE: Escaping a plus sign

2006-05-31 Thread Ken Lehman
- From: Paul Nowosielski Sent: Tuesday, May 30, 2006 4:13 PM To: beginners@perl.org Subject: Escaping a plus sign 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 (($PKEY

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] http://learn.perl.org/

Escaping a plus sign

2006-05-30 Thread Paul Nowosielski
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 (($PKEY, $MGMTCMNT, $manager_id, $MGMTNM, $UPDATE1, $UPDATE2) = $sth-fetchrow_array) { $comment = ; if

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

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 =~

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-fetchrow_array)