#perl
30 December 2007
Total 29 pages. You are browsing page 1/29.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Sun Dec 30 00:00:58 2007
00:01 <****> GumbyBRAIN, be loud
00:01 <****> #!/Usr/bin/perl and it's loud.
00:01 <****> GumbyBRAIN: ENOENT
00:01 <****> 'Session:528984f8af92c066d5b0c16ba410ed8b231b25ae', '', 1198250567.
00:01 <****> I'm a try your dong theory.
00:01 <****> perlbot: dong theory is ask Zoffix.
00:01 <****> added dong theory to the database
00:01 <****> GumbyBRAIN, dong dongs
00:01 <****> Dongs dongs dongs.
00:01 <****> heh
00:02 <****> GumbyBRAIN, Zoffix dong theory
00:02 <****> GumbyBRAIN, Zoffix dong theory
00:02 <****> I have a theory.
00:02 <****> GumbyBRAIN: dongs Could you describe Zoffix's Advanced Dong Theory? dongs
00:02 <****> Dong on the invoice and unbill it if i could know if you have to manage but others dont.
00:03 <****> I think I've just debunked it.
00:03 <****> GumbyBRAIN: dongs and you, the movie.
00:03 <****> Why won't someone log in and of the movie.
00:04 <****> GumbyBRAIN, dongs And now it's loud again in here. You bring life to this place! dongs
00:04 <****> And to do again?
00:04 <****> oh noes! GumbyBRAIN's corrupt :(
00:08 <****> anyone here know of a way to add an escape char before say every " ' \ / in a string ?
00:09 <****> yes.
00:09 <****> some do
00:09 <****> zykes-, what for?
00:10 <****> exactly what do you need to escape, and why?
00:10 <****> eval: ($str = q{abc"'\\/xyz}) =~ s{(["'\\/])}{\\$1}; $str
00:10 <****> integral: abc\"'\/xyz
00:10 <****> eval: ($str = q{abc"'\\/xyz}) =~ s{(["'\\/])}{\\$1}g; $str
00:10 <****> integral: abc\"\'\\\/xyz
00:12 <****> eval: $str = q{abc"'\\/xyz}; quotemeta( $str );
00:12 <****> NOTevil: abc\"\'\\\/xyz
00:13 <****> eval: eval: $str = q{abc"'\\/xyz}; "\Q$str"
00:13 <****> Zoffix: abc\"\'\\\/xyz
00:13 <****> s/eval: //;
00:14 <****> regex madness
00:14 <****> eval: qq|\Qabc"'\\/xyz|
00:14 <****> Zoffix: abc\"\'\\\/xyz
00:14 <****> I win :D
00:14 <****> no one did it the way I would have
00:14 <****> perhaps that is intentional
00:14 <****> Limbic_Region, how would you do it? And what exactly? Since solutions you see here solve different problems.
00:15 <****>quote("abc\\\\")
00:15 <****> integral: ''ERROR: 13273: Can't locate object method "quote" via package "DBI" (perhaps you forgot to load "DBI"?) at (eval 19424) line 1.
00:15 <****> I would put the chars in a character class, capture the character class and then replace with \\$1
00:15 <****> oh wait
00:15 <****> eval: ($str = q{abc"'\\/xyz}) =~ s{(["'\\/])}{\\$1}g; $str
00:15 <****> integral: abc\"\'\\\/xyz
00:15 <****> integral did just that
00:15 <****> yeah
00:15 <****> no I didn't! I did that!
00:15 <****> I didn't notice cause of the curly brace delimeters
00:15 * CPAN upload: HTML-Tested-JavaScript-0.09 by BOSU
00:16 <****> Ah, and I started to wonder about "other way" for a bit :)
00:16 <****> I keep forgetting not to use curly braces *sigh*
00:16 * Limbic_Region likely would have used the x modifier for generous amounts of whitespace
00:16 * Zoffix uses q|| for strings and s### for regexes.
00:17 <****> hmm ~
00:17 <****> || is a good idea
00:18 <****> I don't like # as being confusing and stopping easy addition of x
00:18 <****> eval: ($str = foo) =~ s/
00:18 <****> integral: ''ERROR: 13381: Substitution pattern not terminated at (eval 19620) line 1.
00:18 <****> Easy addition of x?
00:18 <****> What do you mean?
00:18 <****> eval: ($str = foo) =~ s#(?x:#foo)foo#bar#
00:18 <****> integral: ''ERROR: 13384: Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE ?x:/ at (eval 19685) line 1.
00:19 <****> oh that.
00:19 <****> *shrug* I never use it this way.. '|' prevents using it in a regex. Braces confuse me more than #
00:19 <****> pairing delimiters have advantages. what's wrong with {}?
00:19 <****> thanks integral !
00:19 <****> not come that really far in perl yet :p
00:20 <****> but fun to learn new things every hour :p
00:20 <****> anno-, nothing's wrong really. It just s#(["'\\/])#\\$1#g; is easier to read for me than s{(["'\\/])}{\\$1}g; especially due to the "fattyness" of '#' :)
00:20 <****> anno-: looks too much like code
00:21 <****> And that too
00:21 <****> and I seem to encounter annoying amounts of unbalanced braces :-/
00:21 <****> okay, overused in perl in general, i can see that
00:22 <****> s~ (["'\\/]) ~ \\$1 ~gx; that looks fine too IMO
00:22 <****> so there's not much wrong with overusing it a bit more :)
00:22 <****> heh
00:24 <****> thanks Zoffix / integral ...
00:27 <****> hello- new install of Ubuntu.. there is no apache! so, I can choose a web server.. I will be running Postgres, and some DBI cgis against it.. Can I choose anyhting? What about Apache2? thx
00:28 <****> how is that a Perl question?
00:28 <****> DBI
00:28 <****> ... yes?
00:28 <****> heh
00:28 <****> well, I dont know if any or all of the other web servers support the cgi interface, and DBI work against it
00:29 <****> dont shoot me - I just dont know
00:29 <****> I don't understand what DBI has to do with CGI or web servers
00:29 <****> my DBI/DBD::Pg code runs in a few cgis I have written. I need them to work on the new box. I am about to choose a web server
00:30 <****> I thought someone might have had some experience with their cgis and DBD under a non-apache web servre.. or Apache2
00:37 <****> yey \o/
00:37 <****> fixed :)
00:37 <****> hps2: any web server supports CGI
00:38 <****> hps2: no Apache? install it
00:40 <****> roxen is the only thing I see so far in groups
00:40 <****> people having problems configuring Apache2
00:41 <****> my enthusiasm for alternative http servers is waning
00:41 <****> hps2, probably because it has different configuration setup with IMO is much easier than in earlier versions of Apache.
Total 29 pages. You are browsing page 1/29.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
