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