@# 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 32



Comments:

<0> XML::Mini is pure-perl too
<1> Hey.. I have a webpage where I want to post a filename to a script, but I do not want the page I am sending this command from to change at all.. nor to I want to open new window.. is this possible? dhtml? any docs you could point me to?
<2> yeah - you can do almost anything with javascript
<0> not perl related. but javascript can do it
<2> including intercept a onSubmit
<0> tziOm: or, you use an iframe.
<2> however, that's not #perl :)
<0> merlyn: XML::Smart's POD has a _LOT_ of spelling mistakes :/
<1> hmm.. so javascript could post to a script in the "background"?
<1> ..to a perl cgi ;)
<2> tziOm - sure... AJAX is all about that.
<1> AJAX? .. thought that was for washing the toilet.. but hey..
<2> it's XML::Smart, not XML::SpelledWell :)
<1> merlyn, any chance of getting any info back from the script after a while..? to i.e change bordercolor in a <img>?



<0> tziOm: YES. JAVASCRIPT CAN DO THAT. THAT'S WHAT AJAX IS ALL ABOUT.
<2> and again, that is not #perl
<2> that is #javascript. go there. :)
<3> hi, is there a way to get the time in microseconds? (need to benchmark a script and can't install libraries)
<0> Kilbor: use Benchmark ?
<0> and just run it a few thousand times
<3> i can;t install libraries
<0> Benchmark comes with perl
<3> anything that comes default with perl?
<3> o it does? let me try
<2> "can't install libraries" is false
<2> please to not be lying
<4> wow. what an obnoxious CD this is. :(
<2> "unable to understand how to install a library" is more like it
<3> no more like "no provileges"
<2> you don't need privs
<0> "my teacher won't let us use modules"
<0> that's a good one too.
<4> it's one of those sony backdoor ****ty ones.
<2> you can install modules in your area.
<4> and I can't import it into iTunes
<2> as a normal user.
<2> "perldoc perlmodinstall"
<5> perlmodinstall - Perl modules: how to install from CPAN. To access this perldoc please type, at a command line, 'perldoc perlmodinstall'. You may also find it at http://perldoc.perl.org/perlmodinstall.html
<3> check, not installing any modules...
<3> question was if it can be done without extra modules
<6> japhy: you can make them send you a real CD
<2> use Benchmark; # that's core
<3> cool will try ty
<4> resiak: apparently, I can join a Cl*** Action Lawsuit
<6> corelist: Benchmark
<5> This was added to Perl5
<6> japhy: yes.
<0> corelist: Time::HiRes
<5> This was added to Perl5.007003
<0> ah. T::HR is core too.
<7> is it easy to p*** an array from one script to another? this would be with CGI
<0> probably.
<4> csb: the only thing that gets p***ed to a CGI script is a query string and/or data on STDIN
<2> csb - do you mean "p***" in the web sense, or "p***" in the calling the second script directly from the first all in one web hit?
<4> csb: a Perl array would either have to be p***ed as multiple fields or serialized before transmission and deserialized on the other side
<0> hmm. asplosion.
<7> i mean p***ed, the way you p*** variables with POST and GET...strings...what japhy said sounds like what i need to do. it serialize/deserialize good practice?
<4> csb: you can use the Storable module (it's in the core) to do it
<8> csb: You don't p*** variables. You p*** values. You *have* to serialize in some way.
<4> then you simply URL-encode the resulting serialized thing
<7> the thing is, my script is getting pretty big, 500 lines, and there is a nice 100-line chunk i can break out, but i p*** it an array, so i would need to p*** the same array if i broke it out
<4> csb: oh, wait. is this ALL happening at once?
<7> PerlJam: yes, i know. i meant "values"
<4> csb: if you're just removing a function from xyz.pl to put it in a library, you don't need to do anything fancy
<7> japhy: well this 100-line part of my script is not used all the time, maybe 50% or less. so i figured i would break it out into another script and "call" it when i need to
<4> no, don't do that
<1> Botje, could you point me to a AJAX tutorial of somekind?
<4> just put the function in a library
<4> and require() the library if and only if you need it
<4> sub do_this_thing { require "myfunction.pl"; call_the_function(@_) }
<7> japhy: but i am running my script on a webhost. don't i need them to add that then (which i doubt they would do).
<0> tziOm: google knows.



<4> something like that, where 'call_the_function()' is defined in myfunction.pl
<7> i might be thinking of modules
<4> csb: modules are just other perl files
<1> Botje, google doesnt know the best info anymore.
<4> and in your case, this isn't even a module. it's just a simple library.
<0> tziOm: that's a shoddy lie and you know it.
<4> it's just another Perl program.
<7> ok.
<7> japhy: yeah, ok, that's what i am looking to do. it's just another perl script
<4> csb: except it's one that you don't have to "call", it's one you can include in your program
<9> hi all. I was wondering if anyone could point me in the right direction of a package that will let me put bytes in the form of \xAA hex sequences on the wire
<7> japhy: i see...so then i would treat it as if it were in my script, so i could do "sub(@array, $var)
<8> joseki: A package? Don't you just want print?
<9> PerlJam: okay, thanks ;)
<2> Ick. in the "PAUSEr without a clue" department - http://search.cpan.org/~aspeer/Bundle-WebDyne-Dist-1.26/
<2> he includes (a) a bundle that refers to modules that aren't on CPAN and
<2> (b) a copy of CPAN.pm
<2> double plus ungood
<10> java rulez
<2> but Perl Uber Alles!
<11> yeah, it rules the land of slow resource hogs
<2> when I think back to the number of times Perl source code saved me last week compared to having only a .jar file from Java, I thank the maker I'm coding in Perl
<0> wasn't sun opensourcing java Real Soon Now (tm) ?
<2> that's not going to help the third parties
<2> I'm talking about having the source code to an ill-documented CPAN module
<0> oh.
<2> so I can (a) figure out what's wrong (b) contribute the patch (c) work around it until the patch is distroed
<0> I thought you were referring to the perl source code itself
<2> nope.
<2> I don't recall looking at that in a while. :)
<0> good for you.
<0> brain bleach is expensive nowadays ;)
<2> good drugs are hard to come by. :)
<12> so I have this regex: s/\@Article\{pmid[\d]+\, Author=\"([\w]+)\,/\@Article\{\L$1\, Author=\"$1\,/
<12> the idea is I need to lowercase $1 in the first occurrence
<0> azazello: ETOOMANYBACKSLASHES
<12> but I don't want to lowercase the second occurrence
<12> but it does
<12> what do I do waaah
<0> \L continues
<0> you need to end it with a \E
<13> druuuuuuuuuugs
<12> oh! ok
<13> I have some good medz
<13> lemme see
<12> cool thank you Botje
<13> valproic acid, clonazepam, perphenazine, and buproprion!
<13> I got drugs coming out my ***.
<0> s/\@Article\{pmid\d+, Author="(\w+)\,/\@Article{\L$1\E, Author="$1,/
<12> yeah got it
<0> look! now with 90% less backslashes
<12> I just spray them around to be safe :D
<0> you also make things hideously unreadable
<14> you know, /x would really help that out
<12> which I should stop doing yes and just remember which characters must be escaped
<0> I believe you can ask perl ..
<0> eval: qr/\,\=\./
<5> Botje: Return: qr/(?-xism:,=\.)/
<0> see how it neatly tells you which can be unescaped? :)
<12> neatly heh
<0> s/(?=unesc)/left /
<0> eval: qr/\@Article\{pmid[\d]+\, Author=\"([\w]+)\,/
<5> Botje: Return: qr/(?-xism:\@Article\{pmid[\d]+, Author="([\w]+),)/
<0> hmm
<0> now if only it recognized unnecessary [] ..
<12> buproprion is a scary name for a drug if you know what a prion is
<0> buuproprion would be even MORE scary
<0> woah.
<0> extraneous [] really slow things down
<15> "Botje" at 213.118.64.130 pasted "Benchmark: /[\w]+/ vs /\w+/" (13 lines, 251B) at http://sial.org/pbot/17469
<0> in case anyone cares :)
<0> without is ~ 213 % faster
<1> is it possible to have <a onclick="JavaScript:"?


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

ubuntu firestarter add rule greyed out
function mysql_escape_chars()
fish acvarium
printer mp130 ubuntu
#php
mips uclibc dlopen segment fault
glxgeras fps
HP DL380 ipmitool
E: Package xine has no installation candidate
rpm conver, alien, linux



Home  |  disclaimer  |  contact  |  submit quotes