Re: unexpected escaping

2016-01-29 Thread Charles DeRykus
On Fri, Jan 29, 2016 at 12:39 AM, Jorge Almeida wrote: > Can someone help me to understand this? > > #!/usr/bin/perl > use strict; > use warnings; > my $s='\\n'; > print $s; > > > Output: > \n > > Expected output: > \\n > > > Jorge Almeida > From: perldoc perlop q/STRING/

Re: unexpected escaping

2016-01-29 Thread Jorge Almeida
On Fri, Jan 29, 2016 at 2:48 AM, Charles DeRykus wrote: > On Fri, Jan 29, 2016 at 12:39 AM, Jorge Almeida wrote: >> Can someone help me to understand this? >> >> #!/usr/bin/perl >> use strict; >> use warnings; >> my $s='\\n'; >> print $s; >> >> >> Output:

unexpected escaping

2016-01-29 Thread Jorge Almeida
Can someone help me to understand this? #!/usr/bin/perl use strict; use warnings; my $s='\\n'; print $s; Output: \n Expected output: \\n TIA Jorge Almeida -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: question on escaping shell command

2014-05-16 Thread Simon Foutaiz
You can take a look at the IPC::Cmd module that should remove some pain when dealing with system commands through Perl. https://metacpan.org/pod/IPC::Cmd On Thu, May 15, 2014 at 3:10 PM, Chris Knipe sav...@savage.za.org wrote: Hi All, I'm having a bit of a strange issue executing a system

Re: question on escaping shell command

2014-05-16 Thread Chris Knipe
Thanks for all the suggestions and replies guys. After further investigation, it seems the bug is rather in the shell program itself. Even if reading the values from a text file instead of STDIN, it still refuses to parse anything beyond a # character. I've altered my code to use Authen::Radius

question on escaping shell command

2014-05-15 Thread Chris Knipe
Hi All, I'm having a bit of a strange issue executing a system command through perl. The system command reads a bunch of parameters through STDIN, and responds via STDOUT. The problem is that special commands (notably the # and ! character. Perl itself, escapes the characters correctly (as

Re: question on escaping shell command

2014-05-15 Thread Robert Wohlfarth
warnings; my $AuthName = user\@domain.com; my $AuthPass = !\@#bsay0nd; Try escaping the # for the shell, like this: my $AuthPass = !\@\\#bsay0nd; The shell sees the # and treats the rest of the line like a comment. When passing !@\#bsay0nd to the shell, it interprets # as a literal character instead

Re: escaping regex to do math on backreferences

2009-04-13 Thread Gunnar Hjalmarsson
Chas. Owens wrote: On Sun, Apr 12, 2009 at 21:58, Gunnar Hjalmarsson nore...@gunnar.cc wrote: Chas. Owens wrote: my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /; my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /; --^ snip That depends on who you play with. Ok. Also, if you

Re: escaping regex to do math on backreferences

2009-04-13 Thread Chas. Owens
On Mon, Apr 13, 2009 at 06:12, Gunnar Hjalmarsson nore...@gunnar.cc wrote: snip Also, if you make that change you need to check the for loop as well: for my $i (0 .. 10) { Actually no. $ perl -wle ' @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A/; print map $_.[cdhs], @rank[10..10+4]; ' Use of

escaping regex to do math on backreferences

2009-04-12 Thread Andrew Fithian
Hello everyone, I have a program that needs to find straights in a hand of cards. The hand is a string with no whitespace sorted by the cards' ranks, eg 9d10cJhQsKd. How can I identify if that hand contains a straight with a single regex? Is that even possible? Is there a way to escape the regex

Re: escaping regex to do math on backreferences

2009-04-12 Thread Gunnar Hjalmarsson
Andrew Fithian wrote: I have a program that needs to find straights in a hand of cards. Only straights? The hand is a string with no whitespace sorted by the cards' ranks, eg 9d10cJhQsKd. How can I identify if that hand contains a straight with a single regex? Why on earth would you want

Re: escaping regex to do math on backreferences

2009-04-12 Thread Chas. Owens
On Sun, Apr 12, 2009 at 18:34, Andrew Fithian afit...@gmail.com wrote: Hello everyone, I have a program that needs to find straights in a hand of cards. The hand is a string with no whitespace sorted by the cards' ranks, eg 9d10cJhQsKd. How can I identify if that hand contains a straight with

Re: escaping regex to do math on backreferences

2009-04-12 Thread Gunnar Hjalmarsson
Chas. Owens wrote: my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /; my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /; --^ -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: escaping regex to do math on backreferences

2009-04-12 Thread Chas. Owens
On Sun, Apr 12, 2009 at 21:58, Gunnar Hjalmarsson nore...@gunnar.cc wrote: Chas. Owens wrote: my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /;    my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /; --^ snip That depends on who you play with. Also, if you make that change you need to

Re: unwanted escaping of with XML::DOM

2008-02-10 Thread Gunnar Hjalmarsson
Alois Heuboeck wrote: Gunnar Hjalmarsson wrote: What if you simply say: my $titleText = 'Die Brücke.'; you mean resolving the entities first? It's a possibility, but at the moment I'd like to see the form of the input as a given. (The script I posted to the list is a simplified test

unwanted escaping of with XML::DOM

2008-02-09 Thread Alois Heuboeck
Hi I'm trying to feed text into an existing XML tree - the problem I'm encountering is that the text may contain entity references (including the 'forbidden' ''), in which case the is escaped by 'amp;'. I'm using the module XML::DOM for this. Here's an example of an empty tree (the file

Re: unwanted escaping of with XML::DOM

2008-02-09 Thread Gunnar Hjalmarsson
Alois Heuboeck wrote: I'm trying to feed text into an existing XML tree - the problem I'm encountering is that the text may contain entity references (including the 'forbidden' ''), in which case the is escaped by 'amp;'. I'm using the module XML::DOM for this. snip my $titleText = Die

Re: unwanted escaping of with XML::DOM

2008-02-09 Thread Alois Heuboeck
Gunnar Hjalmarsson wrote: Alois Heuboeck wrote: I'm trying to feed text into an existing XML tree - the problem I'm encountering is that the text may contain entity references (including the 'forbidden' ''), in which case the is escaped by 'amp;'. I'm using the module XML::DOM for this.

qr() and escaping a RegEx string

2007-10-27 Thread yitzle
I want to search some text for a user provided string. I was getting input and escaping it with qr(). I then used the qr()'ed value as input to my grep. However, I realized that qr() works too well for my pursposes. I want the user input to be interpretted as a string literal, not as a RegEx, ie

Re: qr() and escaping a RegEx string

2007-10-27 Thread Gunnar Hjalmarsson
yitzle wrote: I want to search some text for a user provided string. I was getting input and escaping it with qr(). I then used the qr()'ed value as input to my grep. However, I realized that qr() works too well for my pursposes. I want the user input to be interpretted as a string literal

Re: qr() and escaping a RegEx string

2007-10-27 Thread John W . Krahn
On Saturday 27 October 2007 21:18, yitzle wrote: I want to search some text for a user provided string. I was getting input and escaping it with qr(). I then used the qr()'ed value as input to my grep. However, I realized that qr() works too well for my pursposes. I want the user input

Re: qr() and escaping a RegEx string

2007-10-27 Thread yitzle
Thanks. That answers my question! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: working with regexp without escaping range symbol

2007-08-06 Thread Paul Lalli
On Aug 5, 12:39 am, [EMAIL PROTECTED] (Aruna Goke) wrote: How can I work with this kind on expression without escaping the range. #!/usr/bin/perl use warnings; use strict; use DateTime; my $ystd = DateTime-today-subtract(days = 1); my $mdy = $ystd-ymd('-'); #date format in 09-25-2007

working with regexp without escaping range symbol

2007-08-04 Thread Aruna Goke
hello all, How can I work with this kind on expression without escaping the range. #!/usr/bin/perl use warnings; use strict; use DateTime; my $ystd = DateTime-today-subtract(days = 1); my $mdy = $ystd-ymd('-'); #date format in 09-25-2007 my $dty = $ystd-mdy(''); #date in format 09252007

[Fwd: working with regexp without escaping range symbol]

2007-08-04 Thread Aruna Goke
I made a wrong substitution in the if(/$ystd/) instead of if(/$mdy/). Thanks Goksie Original Message Subject: working with regexp without escaping range symbol Date: Sun, 05 Aug 2007 05:39:09 +0100 From: Aruna Goke [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: beginners

Re: working with regexp without escaping range symbol

2007-08-04 Thread Jeff Pang
-Original Message- From: Aruna Goke [EMAIL PROTECTED] Sent: Aug 5, 2007 12:39 PM To: beginners@perl.org Subject: working with regexp without escaping range symbol hello all, How can I work with this kind on expression without escaping the range. #!/usr/bin/perl use warnings; use

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)

Escaping large chunk of text for insertion into mysql

2006-02-01 Thread Kevin Old
Hello everyone, I have a large chunk of data that I need to insert into a text or blob field in mysql. I've tried all the usually escaping it, but nothing seems to work. I'm even using dbh-quote as I thought it might help. Here's my code: my $sth = $dbh-prepare(insert into nascar_media values

Re: Escaping large chunk of text for insertion into mysql

2006-02-01 Thread John Doe
Kevin Old am Mittwoch, 1. Februar 2006 13.44: Hello everyone, I have a large chunk of data that I need to insert into a text or blob field in mysql. I've tried all the usually escaping it, but nothing seems to work. I'm even using dbh-quote as I thought it might help. Here's my code: my

Re: Escaping with tr

2005-09-02 Thread Bernard van de Koppel
Hi, Thanks for the warning. As far as the specs are, a semicolon is not allowed as data in the datastream (yet) (of an electronic banking backend application). Some files however don't use the doublequote combined with the semicolon, but just the semicolon to identify fields. So far the

Escaping with tr

2005-08-30 Thread Bernard van de Koppel
Hi, How can I get all the characters out of a csv file. Input looks like bla bla;bla bla;bla bla and it has to look like bla bla;bla bla; bla bla I tried $text=~ tr(#\##); but perl keeps complaining about Might be a runaway multi-line ;; starting on the line with tr. Help greatly

Re: Escaping with tr

2005-08-30 Thread Eric Walker
On Tuesday 30 August 2005 04:16 pm, Bernard van de Koppel wrote: bla bla;bla bla;bla bla cat test.file | sed 's/\//g' editedfile -- Eric Walker EDA/CAD Engineer Work: 208-368-2573 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Escaping with tr

2005-08-30 Thread JupiterHost.Net
Eric Walker wrote: On Tuesday 30 August 2005 04:16 pm, Bernard van de Koppel wrote: bla bla;bla bla;bla bla cat test.file | sed 's/\//g' editedfile Good solution for sed list and if you like redirtecting from a pipe and using multiple program when unnecessary (do you also where mits

Re: Escaping with tr

2005-08-30 Thread Wiggins d'Anconia
Eric Walker wrote: On Tuesday 30 August 2005 04:16 pm, Bernard van de Koppel wrote: bla bla;bla bla;bla bla cat test.file | sed 's/\//g' editedfile Quick someone get the can of UUoC Be Gone ... ;-) http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Escaping with tr

2005-08-30 Thread Bernard van de Koppel
Eric, thanks for the response. After some fideling, I found a solution. $text=~ tr/\042/ /; Thanks. On Tuesday 30 August 2005 22:20, Eric Walker wrote: On Tuesday 30 August 2005 04:16 pm, Bernard van de Koppel wrote: bla bla;bla bla;bla bla cat test.file | sed 's/\//g' editedfile --

Re: Escaping with tr

2005-08-30 Thread Scott Taylor
Bernard van de Koppel said: Hi, How can I get all the characters out of a csv file. Input looks like bla bla;bla bla;bla bla and it has to look like bla bla;bla bla; bla bla I tried $text=~ tr(#\##); but perl keeps complaining about Might be a runaway multi-line ;; starting on the

Re: Escaping with tr

2005-08-30 Thread Wiggins d'Anconia
Scott Taylor wrote: Hi, How can I get all the characters out of a csv file. Input looks like bla bla;bla bla;bla bla and it has to look like bla bla;bla bla; bla bla I tried $text=~ tr(#\##); but perl keeps complaining about Might be a runaway multi-line ;; On a more serious note. Simply

Re: Escaping with tr

2005-08-30 Thread Scott Taylor
Wiggins d'Anconia said: Scott Taylor wrote: I did not. Hi, How can I get all the characters out of a csv file. Input looks like bla bla;bla bla;bla bla and it has to look like bla bla;bla bla; bla bla I tried $text=~ tr(#\##); but perl keeps complaining about Might be a runaway multi-line

Re: Escaping with tr

2005-08-30 Thread Bernard van de Koppel
Hi, Thanks, this works great. Bernard On Tuesday 30 August 2005 23:23, Scott Taylor wrote: Hi, How can I get all the characters out of a csv file. Input looks like bla bla;bla bla;bla bla and it has to look like bla bla;bla bla; bla bla I tried $text=~ tr(#\##); but perl

Re: Escaping with tr

2005-08-30 Thread John W. Krahn
Bernard van de Koppel wrote: Hi, Hello, How can I get all the characters out of a csv file. Input looks like bla bla;bla bla;bla bla and it has to look like bla bla;bla bla; bla bla I tried $text=~ tr(#\##); $text =~ tr///d; John -- use Perl; program fulfillment -- To

Re: escaping values (DBD::mysql)

2005-08-01 Thread Jeff 'japhy' Pinyan
On Jul 31, Octavian Rasnita said: select ... limit 0,30; but I cannot use: $sth = $dbh-prepare(select ... limit ?,?); $sth-execute(0, 30); ... because DBI replaces the values entered with '0' and '30' and the query won't be valid. No, you probably can't do that because your SQL engine

escaping values (DBD::mysql)

2005-07-31 Thread Octavian Rasnita
Hi, I want to use a query like: select ... limit 0,30; but I cannot use: $sth = $dbh-prepare(select ... limit ?,?); $sth-execute(0, 30); ... because DBI replaces the values entered with '0' and '30' and the query won't be valid. Is there a method to escape the values entered directly, and

Re: escaping @

2005-07-19 Thread Charles Farinella
On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: I had to add a 'chomp' and make sure the line endings in my file were correct, but this worked and I learned something useful as well. Thank you. :-) --charlie Only do things in the loop that must be done in the loop. Reconnecting,

escaping @

2005-07-18 Thread Charles Farinella
I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, if I try to remove them from the db I get errors on just the characters before the @. Here is

RE: escaping @

2005-07-18 Thread Moon, John
Subject: escaping @ I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, if I try to remove them from the db I get errors on just the characters

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Charles Farinella wrote: I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, if I try to remove them from the db I get errors on just the

Re: escaping @

2005-07-18 Thread Charles Farinella
On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: Charles Farinella wrote: I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, if I

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Charles Farinella wrote: On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: Charles Farinella wrote: I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Lawrence Statton wrote: On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: Charles Farinella wrote: I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses

escaping in CGI.pm

2005-06-24 Thread Scott Taylor
Grr... Arg... Hello all, I'm working on my first Perl/CGI database app and run into a bit of a snag: http://myserver/lseid.cgi?LeaseOPID=ADT89theCmd=EditIt this line finds the right data however, everything after the in the LeaseOPID ($row-{leaseopid}) ADT89 gets truncated in this form line:

Re: escaping in CGI.pm

2005-06-24 Thread Joshua Colson
Scott, You're trying to use an ampersand in your URL. Ampersands are special characters in URLs so you must escape it if you want it to be passed as the actual character instead of carrying the special meaning. See http://www.december.com/html/spec/esccodes.html On Fri, 2005-06-24 at 12:51

Re: escaping in CGI.pm

2005-06-24 Thread Scott Taylor
Joshua Colson said: Scott, You're trying to use an ampersand in your URL. Ampersands are special characters in URLs so you must escape it if you want it to be passed as the actual character instead of carrying the special meaning. See http://www.december.com/html/spec/esccodes.html As I

Re: escaping in CGI.pm

2005-06-24 Thread Wiggins d'Anconia
Scott Taylor wrote: Joshua Colson said: Scott, You're trying to use an ampersand in your URL. Ampersands are special characters in URLs so you must escape it if you want it to be passed as the actual character instead of carrying the special meaning. See

RE: Escaping quotes in variable content

2004-05-12 Thread jon
print form name=\test\ action=\http://www.somewhere.com\;\n; printinput type=\text\ name=\frage_text\ size=\100\ value=\$frage_text\ /\n; print /form\n; This wasn't really the question, but... If you have to write html within perl, use qq( ) instead of . It's a lot easier to read, and

RE: Escaping quotes in variable content

2004-05-12 Thread Edvaldo Barbosa Guimar�es
, 2004 11:44 AM To: 'Jan Eden'; Perl Lists Subject: RE: Escaping quotes in variable content Try this: input type=\text\ name=\frage_text\ size=\100\ value=\$frage_text\ -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: 11 May 2004 03:59 PM To: Perl Lists Subject

Escaping quotes in variable content

2004-05-11 Thread Jan Eden
Hi all, how can I escape quotes within a variable's content? I use the following directive to fill an HTML form: input type=text name=frage_text size=100 value=$frage_text / Unfortunately, if $frage_text contains a double quote, the browser will stop displaying the string at that point. I

Re: Escaping quotes in variable content

2004-05-11 Thread David Dorward
On 11 May 2004, at 14:58, Jan Eden wrote: how can I escape quotes within a variable's content? I use the following directive to fill an HTML form: input type=text name=frage_text size=100 value=$frage_text / Unfortunately, if $frage_text contains a double quote, the browser will stop displaying

Re: Escaping quotes in variable content

2004-05-11 Thread Jan Eden
Hi David, David Dorward wrote on 11.05.2004: On 11 May 2004, at 14:58, Jan Eden wrote: how can I escape quotes within a variable's content? I use the following directive to fill an HTML form: input type=text name=frage_text size=100 value=$frage_text / Unfortunately, if $frage_text contains a

RE: Escaping quotes in variable content

2004-05-11 Thread Ash Singh
Try this: input type=\text\ name=\frage_text\ size=\100\ value=\$frage_text\ -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: 11 May 2004 03:59 PM To: Perl Lists Subject: Escaping quotes in variable content Hi all, how can I escape quotes within a variable's

RE: Escaping quotes in variable content

2004-05-11 Thread Ash Singh
; printinput type=\text\ name=\frage_text\ size=\100\ value=\$frage_text\ /\n; print /form\n; I hope this helps Regards Ash. -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: 11 May 2004 04:21 PM To: David Dorward; Perl Lists Subject: Re: Escaping quotes in variable

RE: Escaping quotes in variable content

2004-05-11 Thread Wiggins d Anconia
the archive, please don't do this. escapeHTML or HTML::Entities should do very well. http://danconia.org -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: 11 May 2004 04:21 PM To: David Dorward; Perl Lists Subject: Re: Escaping quotes in variable content Hi

RE: Escaping quotes in variable content

2004-05-11 Thread Jan Eden
[EMAIL PROTECTED] wrote on 11.05.2004: print form name=\test\ action=\http://www.somewhere.com\;\n; printinput type=\text\ name=\frage_text\ size=\100\ value=\$frage_text\ /\n; print /form\n; This wasn't really the question, but... If you have to write html within perl, use qq( )

Escaping

2004-04-08 Thread Malloc7c3
Is there any quick way of parsing a string like: This,Is,A,String,\,,With,A,Comma Into a list (This, Is, A, String, ,, With, A, Comma) Basically, how can I split it by commas, except when it is escaped. Dan

Re: Escaping

2004-04-08 Thread James Edward Gray II
On Apr 8, 2004, at 4:30 PM, [EMAIL PROTECTED] wrote: Is there any quick way of parsing a string like: This,Is,A,String,\,,With,A,Comma Into a list (This, Is, A, String, ,, With, A, Comma) Basically, how can I split it by commas, except when it is escaped. How about: my @fields = split

SQL question escaping quotes

2003-09-28 Thread David Gilden
One final question here on my SQL -- PERL DBI the following is wrong -- it does not work ! $sql = qq|insert into $table_name values (null,now(),$email,$name,$comments);|; $sql = $dbh-quote($sql); ## this line $sth = $dbh-prepare($sql); if I do this: $name = $dbh-quote(param('Name')); $email =

Re: SQL question escaping quotes

2003-09-28 Thread Todd Wade
David Gilden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] One final question here on my SQL -- PERL DBI the following is wrong -- it does not work ! $sql = qq|insert into $table_name values (null,now(),$email,$name,$comments);|; $sql = $dbh-quote($sql); ## this line $sth =

Re: Escaping

2003-08-08 Thread Kristofer Hoch
Marcus, You are going to have to URL escape it. Review URI::Escape... http://theoryx5.uwinnipeg.ca/CPAN/data/URI/URI/Escape.html Thanks, Kristofer = -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d s+:++ a C++ UL++ US+ P+++ L++ W+++ w PS PE t++ b+ G e r+++ z --END GEEK CODE

Escaping

2003-08-07 Thread Marcus Willemsen
Hi everybody, I've written a script that retrieves data from a database and uses this data to built a list of links. snippet-- print(a href='nextscript.pl?subchpt=$result-{subchapter}'More.../a); snippet-- Unfortunatly one Subchapter is named 'MA'. So when I try to retrieve the param

Re: Escaping Ampersands in XML

2003-01-16 Thread Jenda Krynicky
From: Ben Siders [EMAIL PROTECTED] I've got a real easy one here (in theory). I have some XML files that were generated by a program, but generated imperfectly. There's some naked ampersands that need to be converted to amp;. I need a regexp that will detect them and change them. Sounds

Re: Escaping Ampersands in XML

2003-01-16 Thread Jenda Krynicky
Toby Stuart wrote: Try this one: s/(?!\w+;)/amp;/g Problem is that this will break things like #64; Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. --

Re: Escaping Ampersands in XML

2003-01-16 Thread Rob Dixon
Jenda Krynicky wrote: Toby Stuart wrote: Try this one: s/(?!\w+;)/amp;/g Problem is that this will break things like #64; Why not just: s/(?!amp;)/amp;/g i.e. change every ampersand that isn't followed by 'amp;' into amp; Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Escaping Ampersands in XML

2003-01-15 Thread Toby Stuart
-Original Message- From: Ben Siders [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 7:38 AM To: Perl Subject: Escaping Ampersands in XML I've got a real easy one here (in theory). I have some XML files that were generated by a program, but generated imperfectly

Funkyness about escaping an @

2002-09-25 Thread Josh
I've nfc, I've tried double escaping it which did not work. Any help would be appreciated. even a better way to accomplish the same thing. Im new to this so please exscuse my unwieldy code. #!/usr/bin/perl # #This program

Re: Funkyness about escaping an @

2002-09-25 Thread Sudarshan Raghavan
is as follows, but well, the @ is escaped so I've nfc, I've tried double escaping it which did not work. Any help would be appreciated. even a better way to accomplish the same thing. Im new to this so please exscuse my unwieldy code. The error is from the perl called from the system command

Escaping characters

2002-06-04 Thread Barry Jones
Hi, I'm trying to do a patter match for everything contained within {{ stuff }}. Now I've gotten this to work just fine with ** stuff **, ^^ and a several others, but I can't get curly braces to work and I have no idea why. I've tried escaping them with \ and not doing and what have you

Re: Escaping characters

2002-06-04 Thread Felix Geerinckx
tried escaping them with \ and not doing and what have you but it just won't work. [...] $body =~ s/\{\{(.*?)\}\}/\b\$1\\/b\/g; $body = It {{works}} for {{me}}; $body =~ s/{{(.*?)}}/b$1\/b/g; print $body; # prints It bworks/b for bme/b The escape chars on {} are not necessary. What is your

RE: Escaping characters

2002-06-04 Thread Bob Showalter
-Original Message- From: Barry Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 1:15 PM To: Beginners @ Perl (E-mail) Subject: Escaping characters Hi, I'm trying to do a patter match for everything contained within {{ stuff }}. Now I've gotten

RE: Escaping characters

2002-06-04 Thread Barry Jones
Jones; Beginners @ Perl (E-mail) Subject: RE: Escaping characters -Original Message- From: Barry Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 1:15 PM To: Beginners @ Perl (E-mail) Subject: Escaping characters Hi, I'm trying to do a patter match

Escaping HTML tags

2002-03-23 Thread Scott Wahlstrom
Severe newbie that would RTFM if I would have brought it home and i'm not asking the right monestary search strings so i humbly ask for your help... i'll go get going on a fresh pot of coffee...anyhew - snippet away... #!/perl open(OUTPUT, /www/html/toc.html); print (OUTPUT

Re: Escaping HTML tags

2002-03-23 Thread root
I'll gotta stop sending over-caffinated emails...wow, -w works... Scott Wahlstrom wrote: Severe newbie that would RTFM if I would have brought it home and i'm not asking the right monestary search strings so i humbly ask for your help... i'll go get going on a fresh pot of

Re: Escaping HTML tags

2002-03-23 Thread bob ackerman
easiest i would think is here-doc. I like: open (OUTP, hdtst) or die no can open\n; print OUTP HEHE; abc def ghi jkl HEHE On Saturday, March 23, 2002, at 08:15 PM, Scott Wahlstrom wrote: Severe newbie that would RTFM if I would have brought it home and i'm not asking the right monestary

Re: Escaping special characters for regular expressions

2002-02-28 Thread eric-perl
On Wed, 27 Feb 2002, W P wrote: I have a CGI script which takes two strings. It searches for the first string in a file, replacing it with the second one. This file isn't really important, more for fun, so I'm not too worried about people deleting the whole file if they actually type out

Re: Escaping special characters for regular expressions

2002-02-28 Thread W P
i don't want to just escape those characters. they were merely examples. i was hoping maybe there was some built-in way to escape ALL the characters that mean anything to regular expressions. it just seemed like a lot of work to put a \ before all the characters that regular expressions

Re: Escaping special characters for regular expressions

2002-02-28 Thread Curtis Poe
--- W P [EMAIL PROTECTED] wrote: i don't want to just escape those characters. they were merely examples. i was hoping maybe there was some built-in way to escape ALL the characters that mean anything to regular expressions. Well, technically, *all* characters mean something to a regex. I

Re: Escaping special characters for regular expressions

2002-02-28 Thread Rob Roudebush
Wouldn't single quotes do the trick? Curtis Poe [EMAIL PROTECTED] wrote: --- W P wrote: i don't want to just escape those characters. they were merely examples. i was hoping maybe there was some built-in way to escape ALL the characters that mean anything to regular expressions. Well,

Escaping special characters for regular expressions

2002-02-27 Thread W P
I have a CGI script which takes two strings. It searches for the first string in a file, replacing it with the second one. This file isn't really important, more for fun, so I'm not too worried about people deleting the whole file if they actually type out the contents as the first string.

Shell Escaping and saving files

2001-12-26 Thread John Weez
Hi all, I have a simple crude script which i use to backup some data. I use shell escapes to mount my jazz drive..then tar the data on to the jazz drive...then i attempt to unmount the jazz drive... here is what happens... the program seems to work..the files are saved in /mnt/jazz and i can

SOLVED Re: Shell Escaping and saving files

2001-12-26 Thread John Weez
Ah I see my mistake...i thought perl just assigned the shell escape to the variable..but it seems perl actually executes teh shell escape when the statement is initially assigned to the variable. $backup_rootmail = `tar -cf /mnt/jazz/backup_rootmail.tar /root/mail`; On Wed, 26 Dec 2001,

Re: Shell Escaping and saving files

2001-12-26 Thread John W. Krahn
John Weez wrote: I have a simple crude script which i use to backup some data. I use shell escapes to mount my jazz drive..then tar the data on to the jazz drive...then i attempt to unmount the jazz drive... here is what happens... the program seems to work..the files are saved in

escaping v$session

2001-06-25 Thread Yacketta, Ronald
Folks, I am trying to get some stats from a oracle DB (cant use DBI, dont ask why) I need to escape out v$session, but cant seem to find the right magic :( I have tried v\$session and get the ugly so such table or view Ron

RE: escaping v$session

2001-06-25 Thread Stephen Neu
: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] :Sent: Monday, June 25, 2001 10:45 AM :To: Beginners (E-mail) :Subject: escaping v$session : : :Folks, : :I am trying to get some stats from a oracle DB (cant use DBI, :dont ask why) :I need to escape out v$session, but cant seem to find the :right magic

RE: escaping v$session

2001-06-25 Thread Yacketta, Ronald
-Original Message- From: Stephen Neu [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 12:04 PM To: Perl Beginners (E-mail) Subject: RE: escaping v$session Try 'v$session' instead of v$session The single quote doesn't interpolate variables like the double-quote

RE: escaping v$session

2001-06-25 Thread Stephen Neu
:@active = qx( :sqlplus -S $RTDUSER/$RTDPASS\@$RTD_ORACLE_SID -! :select count(distinct(process)) ACTIVE from --- v$session --- :where last_call_et 60 and :process in (select ltrim(rtrim(to_char(process_id) )) from :session_list); :quit :! :); Ok, so you're using qx(foo), which is the same

RE: escaping v$session

2001-06-25 Thread Chas Owens
On 25 Jun 2001 12:15:15 -0400, Yacketta, Ronald wrote: snip / this is what I am trying todo @active = qx( sqlplus -S $RTDUSER/$RTDPASS\@$RTD_ORACLE_SID -! select count(distinct(process)) ACTIVE from --- v$session --- where last_call_et 60 and process in (select

RE: escaping v$session

2001-06-25 Thread Stephen Neu
:@active = qx( :sqlplus -S $RTDUSER/$RTDPASS\@$RTD_ORACLE_SID -! :select count(distinct(process)) ACTIVE from --- v$session --- :where last_call_et 60 and :process in (select ltrim(rtrim(to_char(process_id) )) from :session_list); :quit :! :); Oh... Didn't see the other variables you were

  1   2   >