@# 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 28 29 30 31



Comments:

<0> http://www.rafb.net/paste/results/wC4qKZ74.html
<1> The paste wC4qKZ74 has been moved to http://erxz.com/pb/1446
<0> its pretty small
<2> hello, i would like to look for \\' in a file in perl, how?
<2> s/in/with/
<0> the idea is that it opens a lot of html files, parses the html files
<3> mandric, huh ?
<2> err, with perl
<0> returns the content
<3> mandric, what are you looking for where ?
<2> pbelau: my sql import is choking on an sql file because of \\'
<3> mandric, escape it out
<3> mandric, \\\\
<3> er
<2> pbelau: editing a 800M file is painful ;)
<3> \\\\\'



<2> pbelau: also greping for "\\'" doesn't work
<2> sorry, unix skills are rusty
<4> Placeholders!
<4> mandric: Grep for '\\'"'"
<0> any luck finding my problem :(
<4> or
<4> or \\\\\'
<5> cnewb: do you know which line it's failing on exactly? try putting more prints to STDERR
<2> buu: nope
<2> buu: neither give me \\'
<0> Paladin its right before the Http::Request->parse(..)
<0> at that line it dies
<6> whats \Z at the end of a regular expression do?
<5> jason^: perldoc perlre
<1> perlre - Perl regular expressions, the rest of the story. To access this perldoc please type, at a command line, 'perldoc perlre'. You may also find it at http://perldoc.perl.org/perlre.html
<2> buu: i thought i'd try perl
<5> cnewb: never used HTTP::Request myself.. so not sure why it's complaining.. at a guess, I would say invalid data..
<6> Paladin`: thanks
<5> jason^: welcome
<2> same thing ... perl -ne "if (/\\\\'/) { print }"
<2> buu: got it
<2> buu: i just stuck that in a file ...
<2> shell escaping always confuses me
<5> "<UnixBarbie> Shell escaping is hard!"
<7> http://pastebin.com/768749 <- i think its hte my $slurp part but this takes forever
<1> The paste 768749 has been moved to http://erxz.com/pb/1448
<7> anyonw anyone know how to write that faster?
<8> mandric: because you are using the wrong quotes!
<7> spikes my cpu when it hits that
<5> acidjazz: write which part faster?
<2> Khisanth: which quotes should i use?
<7> my $slurp = do{ local $/; <$file>; };
<8> ''
<7> Paladin`: spikes my cpu on like 10k files
<7> $file is a file handle
<5> acidjazz: that's about as fast as reading in an entire file into memory is going to get..
<7> :(
<7> maybe its not that part then hmm
<5> acidjazz: you want it faster, get a faster disk
<8> it also doesn't use much cpu
<8> so you are basically trying to solve the wrong problem
<5> Khisanth: it could if it's swapping like crazy to read the entire file into mem..
<8> swapping to read 10k?
<5> I read that as 10,000 files.. not a 10K file
<9> Hi Khisanth
<7> Paladin`: what about the open2 part?
<5> acidjazz: what about it?
<8> that no longer has anything to do with Perl
<7> well maybe its not a cpu thing but
<7> files over 15k this code hangs
<8> sounds like that highlight program is a POS :)
<10> highlighting perl is difficult when it's not done with perl
<7> its unix highlight
<7> let me test it
<7> nope fast as hell
<7> did a 100k file in a second
<7> [Thu Jun 08 16:32:57 2006] [error] [client 71.143.242.251] Premature end of script headers: index.cgi,
<11> acidjazz: use CGI::Carp qw/fatalsToBrowser/;
<11> acidjazz: And check your logs.
<7> put that at the top of this?



<7> ok
<12> perhaps the hang is caused by buffers filling up
<7> which buffer?
<7> still just sitting
<12> all of them . . . highlight's output buffer fills, so it block on its write, so your perl block on its write
<7> [Thu Jun 08 16:38:34 2006] [error] [client 71.143.242.251] Premature end of script headers: index.cgi, referer:
<12> you might be better off using tempfiles instead of trying to keep it in memory
<13> Hello, I could use a little help debugging a perl problem. http://pastebin.com/768769 Does this error mean that $session (cgi) is returning an undefined value?
<1> The paste 768769 has been moved to http://erxz.com/pb/1449
<14> what's the syntax for a hexadecimal number?
<7> about $/;
<7> i added undef $/; and it worked a little faster
<7> tilrman; tempfiles?
<12> tinny: 0xdeadbeef
<7> this is ridiculosu guys
<7> this is 10k
<7> 15k files
<7> brand new box
<7> perl+apache2+cgi
<7> highlighting a 15k file doesnt take 5 minutes
<14> i have a question about $/ too. if I set $/ to '\r' to read mac line endings, why is printing $_\n to a file still making mac line endings?
<5> DforgeH: it means that $session{cgi} is undefined..
<13> Hrm... Any suggestions on how to troubleshoot that?
<12> acidjazz: put the input and/or the output of highlight into a tempfile . . . use File::Temp
<5> DforgeH: find where it gets set.. see why it's not
<12> tinny: the \r is not removed from the line automatically, perhaps that is part of the problem
<14> i'm doing chomp
<14> but I have bigger problems as well
<7> tilrman: do i have to install that? what function from taht am i gonna use?
<14> uh, what does chomp return?
<5> tinny: perldoc -f chomp
<1> chomp. To access this perldoc please type, at a command line, 'perldoc -f chomp'. You may also find it at http://perldoc.perl.org/functions/chomp.html
<14> why can't i ***ign chomp $_ to another variable?
<3> tinny, because chomp modifies the variable itself
<3> my $foo = $_;
<3> chomp($foo)
<3> ;
<13> Paladin`: Hrm... it's declaring the sub httpHeader, but the sub open has "$session{cgi} = CGI->new();"
<14> i'm using this in a vain attempt to replace un-ASCII typographical symbols with tags:
<14> $line =~ s/0x2021/=dd=/g; # double dagger
<14> it does not work
<14> that's my main problem
<14> any suggestions?
<14> $line =~ s/0xA7/=ss=/g; # section mark
<12> acidjazz: no, it is core. read the docs for it. if you are not convinced, read the docs for IPC::Open2 which tell you how open2 is "dangerous"
<7> god this ****s
<5> tinny: you have the literal text "0x2021" in your string?
<14> this doesn't work either, so i don't think it's a unicode roblem
<7> tilrman; it is?
<15> acidjazz: Benchmark is your friend
<14> no, I have the char represented by that hex number in my string
<12> acidjazz: well, you have managed to shoot yourself in the foot with it, or so it may appear
<7> linuxnohow: so then writing to a temporary file is the only way for piping its contents through a unix app??
<7> tilrman: so then writing to a temporary file is the only way for piping its contents through a unix app??
<7> and actually
<7> linuxnohow is the one that auggested open2
<5> tinny: that's not how you say that in a RE.. perldoc perlre look for \x and \P
<1> perlre - Perl regular expressions, the rest of the story. To access this perldoc please type, at a command line, 'perldoc perlre'. You may also find it at http://perldoc.perl.org/perlre.html
<15> i are?
<12> acidjazz: of course not. but it is probably the simplest and less error prone than open2
<14> hmm
<14> someone just told me 0xdeadfeet was the syntax
<14> i'll try the other
<5> tinny: no.. you didn't mention RE at all when you asked..
<14> sorry
<5> tinny: that syntax works fine if you ***ign it to a variable
<14> k
<14> noted
<12> lol dead feet
<14> well, t is not hex
<14> but I forgot the clever one
<5> tinny: deadbeef
<14> that one
<14> is it \x{deadbeef} for long ones, in a search pattern?


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

xubuntu p100
#debian
installing nerolinux on ubuntu dapper using apt
totem-thumbnailer
ubuntu doesn't recognize sempron
mythtv 60bit
#linuxhelp
set visiblity of control in javascript
#qemu
startfluxbox in debian



Home  |  disclaimer  |  contact  |  submit quotes