@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27



Comments:

<0> whizzer: Yeah you might want to check in to that.
<1> whizzer I suggest grabbing code from squirrelmail to replace their mail function calls
<2> hey all, can someone remind me how to repeatedly check a regex in a while loop? i'm doing while($var =~ m{...}gx) { } and getting an infinite loop.. ;(
<1> so that you can use SMTP AUTH
<3> mandric: That's a normal connection.
<0> joseki: Congratulations.
<4> some web scripts would like to send legitimate mail to the script owner etc
<4> f3ew: okay, you beat me to it :-)
<3> mandric: It is the connection to the freenode IRC server.
<5> joseki: i think you use \G ?
<0> joseki: I suggest not modifying $var inside the loop.
<6> Yaakov: yes, i see that now... makes sense. thanks
<2> huh? i'm not modifying a var, i'm just parsing a webpage. m{} is for match
<0> pravus: \G is implicit
<0> joseki: Ignoring the fact that you shouldn't be..
<4> f3ew: sorry to be so long winded, and thanks for the advice



<0> eval: $var=1234; while($var=~m{(\d)}gx){print $1}
<7> buu: 1234Return:
<0> joseki: You sir, are wrong.
<2> buu: oh ok. any recommendation?
<0> joseki: How on earth can I make a recommendation when I know absolutely nothing about your code?
<2> ok, well, I'm fetching a webpage with LWP and then have a while loop that looks for all occurances of uuid looking sytax, i.e.([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})
<0> Fascinating.
<2> then i'm running a function on each occurance inside the while loop
<0> Are you by any chance using another regex on the variable that contains the html?
<8> joseki: are you modifying or doing another regex on $var?
<8> inside the while loop?
<2> no
<9> 10x
<0> Those are the only two things that would cause that expression to infinite loop.
<8> joseki: what does the conditional part of the while loop look like?
<0> joseki: Paste your code to one of the sites in the topic.
<8> if it's: while (($x) = $str =~ /.../g) { ... }
<8> then that's your problem.
<0> He claims it wasn't
<8> you can't do a list ***ignment of a /g'ed regex in a while conditional and get the one-by-one behavior you're expecting
<10> gumbybrain my life is over goodbye cruel world!
<11> already been reported actually. I'll add my feedback onto the same bookmarks sync'd between work/home, which is the spirit of life of the world.
<8> silence is golden.
<8> except now.
<0> Oh I dunno.
<12> You sicko.
<12> Anyways. why 'no' ?
<0> BinGOs: Because I want a mail reader =[
<12> ah.
<0> Can't be that hard.
<8> joseki: did you get lost?
<13> isnt there a module that "tries really hard to find your ipaddress", I thought it was Sys::IP but didnt find anything with that name
<13> or anything like it
<8> There's Net::Hostname
<8> err, Sys::Hostname
<13> hm.. maybe it finds ip too
<8> but that's the hostname, not the IP...
<13> no its Sys::HostIP
<0> Yay, window closing.
<0> japhy: My irc client is so winning.
<14> can I just add directories to @INC in a script and expect perl to be able to find/use modules that are located in those directories?
<13> use lib
<2> :wq!
<15> ZZ
<16> YOU ARE ABOUT TO EAT A BAG OF ****
<16> AND ALSO A BAG OF CUM LOL



<5> someone doesn't like them... i was getting into myself
<5> into it even
<17> loverly
<8> qpt was obviously the man.
<18> Ok, I am pissed. Why doesn't this work? http://pastebin.com/704940 (Error: "Substitution pattern not terminated in file ....")
<7> The paste 704940 has been moved to http://erxz.com/pb/1509
<19> japhy: If you spell moron like man?
<20> so i got a perl script done and am thinking of ways to release it, probably as a tarball if possible. anyone know of a good site that describes how to do so?
<18> it's referring to a perl one liner to do a global search and replace (line 182)
<8> Tybalt: probably because $search or $replacement has a / or a ' in it
<21> Hey I wanna know if I can put CGI IRC on a free Tripod web site? can it be done ?
<17> tobmoox: just a script, not a module?
<17> Nerd42: unlikely.
<20> right
<20> its just a script
<21> http://cgiirc.sourceforge.net/
<22> how would i define my regexp, so that all lowercase characters are deleted, except the ones within the first word?
<17> cd ..; tar -czf whatever.tar.gz directory/
<21> o rly
<18> is there a function built in to escape forward slashes (like in HTML)
<21> hmm well are there any free hosting services that would run CGI IRC ?
<22> ..or my "s/" i guess it would be
<23> why
<17> Nerd42: no, really, I'm 99.9% sure.
<24> tobmoox: what licence would you like to license it under?
<8> Tybalt: you'll probably want to use the quotemeta() function or else \Q...\E
<23> Tybalt: No this isn't ****ing PHP
<25> Tybalt: URI::Escape?
<17> it's impossible. Tripod doesn't give you CGI.
<20> gpl
<21> Well they say they do
<21> they have a "Script Editor" page
<8> `perl -pi -e 's/\Q$this\E/\Q$that\E/' \Q$filename\E`
<21> oh crap i have to leave now
<17> Nerd42: Oh, do they? Then I've hit my 1 in 1000 escape clause. :P
<8> Tybalt: but *I* would suggest not calling `perl ...` from a Perl program. it's kinda silly.
<21> sry i've got to go i'll be back some other time
<0> japhy: Oh ick.
<8> trumpet: can you give a brief example
<0> trumpet: Are you still on that problem?
<22> japhy, ..okey lets say i have a name, i want to shorten. fx.: " Mr Anderson Blah" to "Mr A B" ?
<22> buu, yes :-)
<0> trumpet: SPLIT
<0> And a loop.
<22> buu, i have looked trough it. thats why im asking again
<0> trumpet: Your question had nothing to do with it though
<0> trumpet: What about names like McScotty
<8> trumpet: if you REALLY want to do it in ONE regex, I suppose you could do something batty like...
<22> buu, non-relevent.
<18> japhy, what else would you suggest
<0> trumpet: Non-relevant?! How on earth is that non-relevant?
<22> japhy, no, more are fine :-)
<0> trumpet: Do you really want to produce "MS" for that?
<8> trumpet: heh ;)
<22> buu, sorry, its just, that the situation with such a name, wont accour
<0> Why not?
<8> Tybalt: I would use the code equivalent of it.
<8> { local ($^I, @ARGV) = (".bak", $filename); while (<>) { s/$this/$that/g; print } }
<0> my @ar=split/ /,$name; $abr = "$ar[0] " . substr( $ar[1],0,1 ) . substr( $ar[2],0,1 )
<8> # equiv. of: perl -p -i.bak -e 's/$this/$that/g' $filename
<22> buu, please, just let it go, trust me. thanks
<8> buu: split ' ', please.
<0> japhy: Pssh. I preserve whitespace here.
<8> buu: just like Hitler did. preserving the master space.
<0> YES.
<0> It's like "meatspace" for white people. Or something.
<22> japhy, but what would i be looking for, to do this in more than one go.
<0> japhy: Help it hurts.
<0> trumpet: What the hell is wrong with my code that solves your problem?!
<18> Neither quotemeta or that other regexp helped, I get the same error...
<22> buu, omg, sorry i oversaw it!
<0> my @ar=split/ /,$name; $abr = "$ar[0] "; $abr .= substr( $_,0,1 ) for @ar[1..$#ar]
<0> Tybalt: This is a sign from god to not do that.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#fedora
welcome back script php
#xorg
Xlibs git repositories
#css
#css
suse firewire network
Silent_al
ubuntu phpmyadmin blowfish secret ssl
#perl



Home  |  disclaimer  |  contact  |  submit quotes