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



Comments:

<0> perldata - Perl data structures. To access this perldoc please type, at a command line, 'perldoc perldata'. You may also find it at http://perldoc.perl.org/perldata.html
<1> merlyn, thanks
<2> Ahh. yes, perldoc perlop
<3> search for here-document
<2> ... <<EOF A line-oriented form of quoting is based on the
<4> http://www.brains4zombies.com/
<2> Perl was so much easier to learn when there was only one manapge
<2> glad I started back then. :)
<5> damnit, why won't this work
<6> at the end of that era it was getting pretty big.
<2> yes - 64 typeset pages
<3> perlop is right
<6> kinda big for a "page"
<2> yeah - bigger than even "rn"
<2> which was my previous record page. :)
<6> We still need a reasonable terminal based manual page browser.



<7> Botje: speed is important, it needs to be efficient, not lightning fast.
<8> "ancker" at 192.17.24.143 pasted "email parser" (40 lines, 1.6K) at http://sial.org/pbot/17209
<9> hm, so anyone tried Schedule::Cron? Trying to make it work on second resolution (every 30 sec)
<10> chad--: chances are it'll work just fine in perl, then.
<5> can someone take a look at the above and tell me why the "print MAIL "@page\n\n"; isn't working
<6> chad--: your requirements are still to vague. Maybe a simple application of regexp in a read loop is enough. Maybe not.
<10> ancker: use strict; and check your opens.
<5> Botje: what does check my opens mean?
<10> open(...) or die "Can't open: $!";
<1> How come this line does not work for me: my $htmlHead = <<'EOF';
<10> perlbot doesn't work
<11> What do you mean it doesn't work? What happens when you try to run it? What's the output? What's the error message? What did you expect to happen? We need more information to help you.
<5> Botje: the open and first print line work, the second doesn't
<10> ancker: check your opens anyway.
<5> perlbot: the open() works, the first print line works, the second is ignored, and the close works properly.
<11> added the open() works, the first print line works, the second to the database
<10> and if you use strict; it'll tell you you need to declare @page.
<10> and wtf is ]dot =
<10> and wtf is $dot="1" supposed to do?
<10> or $dot =~ /1/, for that matter
<12> i don't want perl this to 'round off'
<12> $xpos = (12.5 / 10) * 100 + ($x1);
<12> it says its 187 but its 187.5
<5> Botje: its a flag variable that adds the line after the match to the array
<10> ancker: perl understands numbers perfectly.
<10> and a $number with value 1 is true, while a number with value 0 is false
<13> wouterrr: Unless you did a 'use integer', perl doesn't "round off" in that way there. How are you outputting the result?
<12> with print
<5> Botje: that part works fine, @page is being populated like I expect it too...
<5> Botje: okay, changed to if ($dot) {
<10> good.
<10> so why do you think the second print is not working?
<10> what makes it "not work" ?
<5> i have no idea
<12> notwoggle: you've got any idea?
<10> well, try printing @page normally
<10> or with Data::Dumper
<13> wouterrr: No, print certainly uses less rounding than that.
<13> wouterrr: Where is $x1 from?
<12> $x1 is a coordinate
<5> Botje: if I comment out the open() ... close() and run the commands under that...it works fine 'print "@page\n\n";' print exactly what I expect
<12> playing with GD
<12> and it's making me frikkin' crazy, but that are details ;- )
<13> Well, just as a sanity check, make sure ref($xpos) is undef.
<10> ancker: okay. so it should be sending mail then?
<5> Botje: correct, the mail sends, I get the subject, but the body is blank
<10> hmmm
<12> ah
<10> maybe you need TWO newlines between header and body?
<10> (so after the subject: line)
<13> wouterrr: Hm? Is it not undef?
<5> Botje: I've tried that (and just plain running sendmail on the CLI doens't require that)
<12> the var is already initialized, but i just do that statement i showed you before.
<10> ancker: well, i don't know how your particular version of sendmail works so ..
<13> wouterrr: I want you to check if ref($xpos) is undef _after_ that statement.
<12> ah
<5> Botje: how would YOU send the mail then?
<12> hold on
<13> If it is, then you are accidentally using objects with overloaded arithmatic operators.
<10> ancker: there's modules ofr that, afaik
<10> Net::SMTP, for example



<10> which can use sendmail too, I think
<10> or maybe not, grr.
<12> Use of uninitialized value in numeric eq (==) at ./hdb.pl line 47.
<12> if (ref($xpos) == undef) {
<12> print "ll";
<12> }
<12> if i do that
<10> don't paste. and don't compare strings to undef with ==.
<12> cmp
<14> if defined ?
<13> wouterrr: perldoc -f defined
<0> defined. To access this perldoc please type, at a command line, 'perldoc -f defined'. You may also find it at http://perldoc.perl.org/functions/defined.html
<10> ancker: try printing what it would print to STDOUT
<13> wouterrr: But, yeah, what you have establishes that it is undef, as expected.
<10> then invoke sendmail manually and copypaste that
<10> see if it works that way.
<12> ah never mind i'm so g*** *** stupid
<12> i looked at the wrong var
<12> thanks notwoggle
<12> it was not print :- P but you probably knew that from the beginning;-)
<5> Botje: I did that, that works fine
<10> ancker: okay. now save the output to a file
<10> and feed it to sendmail with cat
<10> see if that makes it break
<15> can anyone tell me what file of the IO::Socket::INET cl*** is actually responsible for setting socket options (like blocking/nonblocking) ?
<13> ProN00b: blocking/nonblocking isn't a socket option in the traditional sense of the term.
<5> Botje: that worked
<13> ProN00b: The code that implements the blocking() method on IO::Socket::INET objects is actually part of IO::Handle whose implementation is in IO.xs in the perl source tree.
<13> ProN00b: And I believe the blocking() method is what IO::Socket::INET uses to deal with the Blocking option to its constructor.
<15> yeah, i couldn't find that method
<15> is its code inside the xs ?
<13> IO.xs is the filename the code is inside of, yes.
<13> If you look in the .pm files for any implementation of it, you will be disappointed.
<15> notwoggle, yeah, it only seems to call a blocking method everywhere in the pm files
<15> notwoggle, is that blocking method subcl***ed somewhere so i can modify it ?
<10> ancker: then i'm officially out of ideas.
<15> the reason i am asking all this stuff is that blocking doesn't work on win32, notwoggle
<15> *nonblocking
<13> Hack around that problem is to select (IO::Select) first.
<5> Botje: thanks anyway
<13> What does $socket->blocking(0) return, BTW? undef? If so, does it set $!?
<10> ancker: one last thing you could try is putting a single . on a line by itself at the end
<10> well, gotta run
<10> & train
<13> (Set $! to 0 before calling it to be sure that it sets $!.)
<15> notwoggle, lemme check
<15> notwoggle, contains nothing
<13> ProN00b: And what is the return value of $socket->blocking(0) :
<13> ?
<15> notwoggle, eh, how do i create a socket without connecting it ?
<16> thanks guys!! The code seems to be working almost perfectly..
<16> japhy: merlyn :
<16> Thank you all
<13> ProN00b: Uh, just make a listening socket.
<15> $socket->blocking(0) is a uninitialized value
<13> ProN00b: Well, at least it's correctly indicating it failed.
<15> lol
<2> instead of non-blocking sockets, use POE
<2> POE is amazingly cool
<15> merlyn, dude, do you realize you are saying: no, don't fix this core perl thing, use some ****ty event system that is totally over the top for what you want to do instead
<2> It might not be a problem with Perl. :)
<15> also, merlyn, POE eats friggin babies !
<2> it might be that there's no easy way to make that socket unblocking.
<13> ProN00b: Well, how do you make a file descriptor that refers to a socket non-blocking in C on Windows?
<2> does the equivalent C program work?
<15> merlyn, lets see, on windows different things need to be called to make a socket nonblocking than on linux, how can this be a problem with anything else than perl
<2> Oh - this is Windows?
<2> good LUCK!
<2> I'm told that there's some very difficult things about windows sockets
<2> that the activestate people had to cheat to get things to work right
<2> such as go into the internal memory structures. ick.
<17> tk ****s too in windows right?
<15> merlyn, you ****TY POE already worked arround this problem but didn't submit a patch to it in the IO::Socket::INET module but rather just keep the workarround for themselfes
<15> *your


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

#web
ffmpeg-dev ubuntu
SDL_CDEject example
#lisp
linux kernel nonv
man+description+XF86DGANoDirectVideoMode
HOW DEBIAN INTEL 6300ESB
+ubuntu +make path
#centos
PCBSD and hp1020



Home  |  disclaimer  |  contact  |  submit quotes