| |
| |
| |
|
Comments:
<0> having a problem <1> Anyone around? <1> just kidding <2> hm <2> oi VT` <1> huh <1> oi VT` to you too! <2> 4 lines, ya already irritating as sin <2> I'd say that'd be atleast memorable, if this werent irc... <3> ? <3> -_- <4> I need help of Filemaker <5> Do you have an appointment? <4> what?
<4> something? <4> hi <5> What's your question? <4> about input mask and server <5> Do I have to guess? <4> what? <4> bye <6> I'm having a problem with SQL...I'm trying to import a text file into a SQLite database, if I surround the variable in the SQL statement with ' it fails because the data contains apostrophes, so if I reverse it and surround it with " I don't get what's inside the variable, I get $data stored in my db <6> my $sth=$db->prepare('INSERT INTO fact (id, line) VALUES ($id, "$data")'); <----stores $data in DB <6> my $sth=$db->prepare("INSERT INTO fact (id, line) VALUES ($id, '$data')"); <---gives error <6> nm <7> anyone have ebook: Perl & LWP? <8> helloworld <9> can sum1 help me? i am trying to get my shtml file to read a txt file, now i have all the coding set right but it is just not reading <10> ... <9> ? <10> This is the perl channel not the shtml channel. <9> so <9> its cgi <9> scritping <9> and last i check #shtml isnt really hoppin <10> well, if you're a perl cgi script embedding a text file is as simple as 'print `cat myfile.txt`'; <9> yea but i think my attributes are ****ed <9> the coding is all right and i can read the txt document by itself and i can read the shtml file, but it wont show the txt file in the shtml <9> in ur case just change the shtml to php <9> :D <9> nm <9> figured it out <9> ****ing htaccess <11> how to replace this correctly ? $string1 =~ s/apples/a(b){c}/g; <10> Uhm. <12> getting errors finding a(b){c} <10> I'm not sure exactly what you're trying to do. <10> What you typed would try to find 'apples' and replace it with 'a(b){c}' <12> oh no <12> my mistake <10> I'm not sure exactly how literally perl woud take the expression. <12> in the code <12> i'm looking for a(b){c} <12> but <10> ... <10> Is c a number? <12> Nested quantifiers in regex; marked by <-- HERE in m/for(int i = 0; i < 12; i++ <12> abc is just text in file <10> erm. <12> I'm looking for this in file <12> for(int i = 0; i < 12; i++) <10> 'pattern{2}' means look for two instances of pattern. <12> like a $string1 =~ s/for(int i = 0; i < 12; i++)/something/g; <10> If you're looking for literal text (text) { text} you'll need backslashes and stuff. <10> And of course () is grouping. <12> i did them
<12> still getting Nested quantifiers in regex; marked by <-- HERE in m/for(int i = 0; i < 12; i++ <10> Hnmm. <12> for\(int i \= 0\; i \< 12\; i\+\+\) <10> No. <10> for\(int i = 0 ; i < 12 ; i \+\+\) <12> thanks :) <13> uhm still <13> Nested quantifiers in regex; marked by <-- HERE in m/for(int i = 0 ; i < 12 ; i <13> ++ <-- HERE )/ at update.pl line 35. <10> I don't think anything you escaped was a group though. <10> Weird. <10> You're not escaping both plusses. <13> u know a ref page where things youshould comment out are marked ? <10> perl -e 'm/for( i = 0 ; i < 10 ; i ++ )/' => nested quantifiers <10> perl -e 'm/for\( i = 0 ; i < 10 ; i \+\+\)/' => works <13> thats exactly my code <13> for\(int i = 0 ; i < 12 ; i \+\+\) <10> What's your perl version? <13> sec <10> Oh, and is that in a perl -e or a file? <13> ActivePerl 5.8 <10> Remember that perl -e with double quotes "" will cause the backslashes to vanish when the shell interprets them. <13> its in file <10> Erm. <10> Oh, that's windows perl. Uh. <13> yes :) <10> Something's wrong with it, I guess. <13> gonna try command line <10> You could try doubling the backslashes but that shouldn't work. <10> Like \\+ <10> Or you could try [+] <10> Putting the plus into a character group should prevent it from being interpreted as a quantifier <13> rofl look <13> Finished renaming for(int i = 0 ; i < 12 ; i [+] [+]) <13> Finished renaming for(int i = 0 ; i < 12 ; i \+ \+) <13> :D <13> oh i know <13> i p*** those variables to a function <10> .... <10> 'variables'? <13> so my $thing = "for\(int i = 0 ; i < 12 ; i \+\+\)" then func($thing,blah,blah) <13> text as a variable <10> See. <10> That's not what you said you were doing. <13> thats what i want to do <10> I could've told you then that you were losing your \ <13> :) <10> You need to use single quotes or qr// <10> You said you were doing s/// <10> not $var = pattern ; s/$var// <10> But the backslashes in double quotes will be interpreted right away before you store it in thing. <13> thanks <13> hey can i look for for * int i = 0; i < 12; ? <13> like put '*' so it will check any similar ones <10> Erm, yes. <10> THat's why we use regexps. <10> You could do something like 'for \( int i = (\d*) ; i < (\d*) ; i\+\+\)' and then a match would put 0 in $1 and 12 in $2 <10> Or you could do something like 'for.*?=.*?<.*?\+\+\.*?\)' and match any for loop of the ***ign/less than/increment sort without saving any information. <10> See the documentation page called 'perlre' for all the glorious details. <13> for.*?=.*?<.*?\+\+\.*? this sort of thing works :) <10> You should still read the perlre manpage. Regular expressions are your friend. <10> That's what perl is you know, Potentus Expressiona Regularus Lingua. Language of powerful regular expressions. ;) <13> perl rules :D
Return to
#perl or Go to some related
logs:
#allnitecafe #java #chat-world #php #kl #kl #chat-world #allnitecafe küfürlü sarkılar #worldchat
|
|