Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#perl

05 November 2007


Total 32 pages. You are browsing page 1/32.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Mon Nov 05 00:00:12 2007
--- Day changed Mon Nov 05 2007
00:00 <****> maybe you need to install it
00:00 <****> no, just 'use' it
00:00 <****> Ah, my bad
00:01 <****> I seem to be missing something
00:01 <****> One or more of Mechanize, Entities or perl itself aren't handling the unicode characters correctly
00:02 <****> oh, I left something out, hold on
00:03 <****> it's not HTML::Entities
00:03 <****> "JDigital" at 86.157.165.45 pasted "It's not interpreting unicode correctly somewhere along the line, it seems" (13 lines, 267B) at http://sial.org/pbot/28435
00:04 <****> I HAVE COOKED. FOOD.
00:04 <****> NO WAI! U IS LIE
00:05 <****> Never.
00:06 <****> It's not cooking if you just heat up a ready meal
00:08 <****> :)
00:11 * Zoffix heats up GumbyBRAIN
00:11 <****> can you give them to be up and up.
00:12 * CPAN upload: CPAN-1.92_51 (++++ ) by ANDK
00:12 * CPAN upload: Bencode-1.3 by ARISTOTLE
00:13 <****> hello :) before i start this question, go easy on me :P im a major beginner with perl, i just started using it today :)
00:14 <****> right, i got a regular expression match which returns a array (because of some grouping).. and i store a reference to this array in a hash list
00:15 <****> .oO( you can't return arrays. hashes aren't lists. )
00:15 <****> ive wrote an online port scanner, it works but its really slow..any tips for making it faster?
00:15 <****> the only way i can figure out to get the length is to do something like "my @test = @{$myHash{thearrayidentifier}}"
00:16 <****> mauke, pardon? :S
00:16 <****> don't you mean $size = @{$myHash{key}}?
00:16 <****> and swapping out WWW::Mechanize for LWP::UserAgent is no good either
00:17 <****> JDigital: that should work better, actually
00:17 <****> mauke, the regular expression returns a array.. and i store a reference to that array in a hash..
00:17 <****> danyul: no.
00:17 <****> the regex returns a list
00:17 <****> mauke, oh :O
00:17 <****> you can put that list in an array and store a reference to that in a hash
00:18 <****> mauke, thats weird =p
00:18 <****> mauke, it says its a array?
00:18 <****> what says it's an array?
00:18 <****> mauke, if i print the reference to it..
00:18 <****> yes, the reference is to an array
00:19 <****> mauke, the list returned by the regular expression
00:19 <****> no
00:19 <****> you can't make a reference to a list
00:19 <****> hi
00:19 <****> mauke, okay, i lost track :P u said it was a list! :P
00:19 <****> yes
00:19 <****> does anyone use XML::LibXML here ?
00:20 <****> mauke, lets start over :P i got a bit of code like this
00:21 <****> Mauke: After all that, same problem!
00:21 <****> JDigital: http://rafb.net/p/JHwYvC55.html
00:21 <****> works here
00:22 <****> mauke, $myhash{ident} = ['random string'] =~ /^(randon)/s(string)/];
00:22 <****> danyul: [ LIST ] creates a new array, puts LIST into it, then returns a reference to that array
00:22 <****> decoded_content, of course!
00:22 <****> mauke, you are a hero
00:22 <****> mauke, okays :D so far so good :D
00:23 <****> and your code has at least 2 syntax errors
00:23 <****> mauke, hehehe, that not the actual code u kno :P
00:23 <****> mauke, i noticed i forgot the $ and misspelled random, i was just trying to be funny :D my vars arent named like that anyways :P
00:24 <****> mauke, but like, then we are back where we started.. i got a hash, with a reference to a array inside it
00:24 <****> right
00:25 <****> what is the best module to handle XML ?
00:25 <****> mauke, and the only way i can figure out how to get the "length" is by doing something like my @tmp = @{$sillyhash{identifier}};
00:25 <****> mauke, and then.. $#tmp
00:25 <****> that doesn't give you the size of the array
00:26 <****> that doesn't give you the size of the array either
00:26 <****> don't you mean $size = @{$myHash{key}}?
00:27 <****> mauke, it seems to give me how many elements thats inside it, like, the "last index" (i got the feeling you are going to save me asking the next part of my question, because i was adding one to that value because i needed it to be 0 if there was zero elements in it (instead of -1) :P)
00:27 <****> just use the array itself (in scalar context)
00:27 <****> that'll give you the number of elements
00:28 <****> mauke, ooooh hold on :P
00:28 <****> brilliant :D
00:28 <****> how would i go about making a port search faster?
00:28 <****> mauke, thanks alot :P
00:28 <****> I find the scalar keyword eases my concience for those kind of things
00:29 <****> s/search/scan/;
00:30 <****> mauke, i thought that would have given me the elements of the array :P
00:30 <****> in list context, yes
00:30 <****> in scalar context it gives you the size
00:31 <****> mauke, cheers :D i shud read some documentation :P i thought i would be able to wing it though learng it (just by playing round with it , but obviously not :D)
00:32 <****> I think it's in perldoc perldata
00:32 <****> playing around is an important part of learning, but so is reading :-)
00:32 <****> mauke, heheh :P but its not as much fun :P
00:33 <****> depends i used to love delving into javadoc
00:33 <****> I get Can't locate lib.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux
00:33 <****> when running scripts in irssi
00:33 <****> but i kinda knew where to expect stuff to be there
00:33 <****> I tried recompiling perl already :\
00:33 <****> mauke, im gonna google the docs u mentioned though, and give them a read :)
00:33 <****> danyul: why google?
00:33 <****> mauke, again, thanks alot for the help :)
00:33 <****> don't you have them on your computer?
00:34 <****> mauke, i dont think so :P
00:34 <****> what happens when you type 'perldoc perl' in a terminal?
00:35 <****> mauke, i hate to say this.. but im on window :$ using a activestate port
00:35 <****> mauke, could try though :D
00:35 <****> then you definitely have it
00:35 <****> but the default windows pager sucks
00:35 <****> look in your start menu for the html docs
00:35 <****> mauke, oh dear, i did have it :D i didnt thought i wud have :D i figured it was a *nix thing :D
00:36 <****> I get Can't locate lib.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux
00:36 <****> Is @INC an environment variable?


Total 32 pages. You are browsing page 1/32.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo