#perl
05 October 2007
Total 43 pages. You are browsing page 43/43.
First :: Prev :: [...] [39] [40] [41] [42] [43] :: Next :: Last
23:21 <****> So they may say "ostrich!" referencing the ostrich's tendency to do the same.
23:21 <****> COX.
23:22 <****> buu, NOTHANKS
23:22 <****> Not even if it has a flavour.
23:23 * talexb wonders if there's a bot that does a more-or-less tally of who's on an IRC channel .. and shows a map based on IP number ..
23:23 <****> talexb: that wouldn't work on freenode.
23:24 <****> A map? Do you mean a graph?
23:24 <****> The colour of the dot would vary according to how recently they're written something on the channel.
23:24 <****> (many people with cloaks)
23:24 <****> xand, Maybe s/IP/hostname/
23:24 <****> xand, because of all the cloaked IPs?
23:24 <****> i have a hash with multiple keys and they are pointing to an array, like $hash{key} = \@array; - still only the last array is the one printed, regardless of the key (but the key has to be valid), any suggestions?
23:24 <****> I'd just put the unaffiliateds into the middle of the Atlantic Ocean. Or something.
23:24 <****> yes
23:24 <****> plot distance based on ping time a la the sonar xscreensaver? :)
23:25 <****> nollan, Did you read perlreftut?
23:25 <****> apeiron, oh yes, multiple times..
23:25 <****> dkr Maybe not .. some people get downright cranky when you ping them, even once.
23:25 <****> nollan, What've you tried?
23:25 <****> talexb, Some people are downright silly and more or less constantly cranky.
23:26 * talexb wanders off home for pizza, beer and a movie.
23:26 * dkr leaves into his own cliché
23:27 <****> apeiron, well, i've checked that the keys are pointing to the right array, still when i try print @{$hash{$key}}; the last array added to the hash gets printed, even thou the key is let say the first key.. do you understand?
23:28 <****> apeiron, but the print %hash; output is key1ARRAY(0x..)key2ARRAY(..)key3ARRAY(..) etc
23:28 <****> nollan: You're adding multiple references to the same array.
23:30 <****> buu, i'm trying to add multiple arrays to a hash where the arrays each have corresponding keys.
23:30 <****> nollan: So?
23:30 <****> buu, ur saying i'm doing something wrong? :)
23:30 <****> Yes.
23:31 <****> buu, but i'm adding the arrays like this $hash{$key} = \@array; using a loop for the keys and arrays.
23:32 <****> nollan: Yes, you aren't creating a new @array in each iteration of the loop.
23:33 <****> buu, hmm.. i assign the array new values.
23:33 <****> NOT WHAT I SAID.
23:36 <****> buu, okey, could you point me in the right direction?
23:37 <****> I'm not sure.
23:37 <****> Try using 'my @array' inside the loop.
23:38 <****> buu, god, it was that easy.. so even thou i assign an array new values it has to be reseted?
23:39 <****> buu, thanks a bunch, i've read reftut fucking ten times.
23:39 <****> nollan: When you do \@array, you're taking a reference to THAT ARRAY.
23:39 <****> my $buuref = \@buu;
23:39 <****>[3] = 42; this modifies @array.
23:40 <****> buu, ahh. i see..
23:40 <****> If you do $array[3] = 56; you also affect $array, because they're the same object.
23:40 <****> ok.. that makes sense
23:41 <****> In your case you had a whole bunch of $arrays, and every time you modified @array it affected all of them.
23:41 <****> So when you cleared it, you cleared them.
23:41 <****> i see that now..
23:42 <****> buu, thanks again. i was beginning to lose it.
23:43 <****> declaring lexical variables (@array in this case) in the smallest possible scope often prevents that effect
23:43 * CPAN upload: Test-More-Diagnostic-0.2 by ANDYA
23:43 * CPAN upload: TAP-Formatter-TextMate-0.1 by ANDYA
23:43 * CPAN upload: CGI-Ex-2.19 by RHANDOM
23:46 <****> What module would you recommend for config files?
23:46 <****> buu, what are you using for buubot?
23:47 <****> Config::JSON <- written by my boss
23:47 <****> Config::IniFiles is what I usually use, it does decent serialization last i checked
23:47 * Zoffix checks
23:49 <****> perlbot 8ball
23:49 <****> Magic 8ball says: Yes
23:52 <****> notsoevil: It works now
23:52 <****> it needs /m;
23:52 <****> arf
--- Log closed Sat Oct 06 00:00:35 2007
Total 43 pages. You are browsing page 43/43.
First :: Prev :: [...] [39] [40] [41] [42] [43] :: Next :: Last
