| |
| |
| |
|
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 33 34 35 36
Comments:
<0> hack: this <1> mangle: I shot the sherrif, but I did not shoot the deputy <0> I dashed the sherrif, notwithstanding I did not ruin the proctor <2> Heh. <1> lol <1> what fun <3> mangle: I flooded #perl and get kick-banned <0> I undersea #perl and git repercuss-shut out <1> heheh <2> repercuss-shut! <4> mangle: row row row your boat. <0> sweep along string array your bucket. <5> guten morgen <1> mangle: I went to bed before anyone had a chance to get ops and kickban me <0> I went to rock bottom up ahead anyone had a fair game to cram the mind ops and kickban me <2> cfedde: That was great.
<3> Yaakov: before Moses is "pre-Mosaic". what is the adjective for before Abraham? <3> Abramaic? <1> Yup <1> Or maybe Abramic .. as in "There are three primary Abramic faiths: Judaism, Islam and Christianity" <2> japhy: Pre-Abrahamaic? <3> Pre-Abrahamic gives me hits in google <2> mangle: Abrahamaic <0> Abrahamaic <1> -a <6> -b <1> Abrahamic .. though Abraham was earlier called Abram .. so pre-Abramic comes before pre-Abrahamic :-P <2> Well, Avram and Avraham--but who's counting? <1> heheh .. I'm going the Anglicized versions :) <1> Probably really more like -_.,_,..,- <6> who was Abram/Avram? <3> pravus - a patriarch of the judeo-christian-islamic faiths <2> pravus: The first of the three Patriarchs of Judaism. <1> Early biblical patriach <2> He taught monotheism. <6> ahh, yes <3> Woosta: actually, unicode is popular there. /\p{IsRael}/ <6> i think there is a debate whether he or Akhenaten was the first to teach monotheism iirc <2> pravus: Actually, monotheism must be MUCH older than Avraham. He was teaching "old-time religion". <6> Yaakov: oh. i'll have to read up some time. <2> pravus: At least inside the system, his ancestors MUST have been monotheists. <2> pravus: But that is such an old history I put it in the realm of religious faith. <7> Hi :) <8> Hola <9> tell me a good movie to watch tonight <8> scarface :-P <10> "Termy" at 128.252.233.73 pasted "Hi, I was wondering if someone could help me with this error" (10 lines, 370B) at http://sial.org/pbot/18312 <9> other one? <7> nachos, do you speak spanish? <9> I like your taste btw <8> hola muchachos - no <7> heh <7> Anyone have any ideas on that post of mine a bit earlier? <9> tell me a good movie to watch tonight <7> I mean... my application works <7> mixas, maria full of grace <7> I mean... my application works* <6> mixas: Fight Club <7> But I get all these annoying errors <8> hurm <8> where's merlyn when you need him. <7> mixas, Maria full of grace if you havent seen it ;) <7> great movie <8> Are you trying to take a slice or use the range operator there Termy ? <7> Im trying to test each element in the array <7> without using a for loop <9> I will see Fantastic four <8> could use map? <6> Termy: map/grep? <8> FANTASTIC FOUR IS CRAP~! <7> pravus, :/ <8> map map map <8> map is wonderful at creating obscure code. <8> well, not really, but it helps! <7> mixas, :/
<7> fantastic four wasnt very good <7> and I'm somewhat into that kinda stuff <8> hurm <11> is it possible to have multidimensinal ***ociate array in perl ? <7> Maria full of grace! ;) ;) <6> empty_mind: yes... but you have to use references <6> empty_mind: btw, ***ociative arrays in perl are called hashes <6> perlbot: references <8> perl > all <12> http://www.shlomifish.org/Vipe/lecture/Perl/Newbies/lecture2/references/, http://perl.plover.com/FAQs/References.html, perlref, perlreftut, perldsc, perllol <7> pravus, any other ideas beside map/grep ;)? <8> I say go with map :-) <7> nachos, hehe <6> Termy: while() ? <6> there aren't that many looping constructs <8> why do you not want to use a loop? <7> pravus, see... here Ill show you my entire program, but the thing is... <11> pravus, i need something like this $query[0]["hotelcode"]. How can i do it <7> when I create a for loop or while <7> the $_ changes <9> ok then what else would I watch notight <9> tonight <7> which like kills the rest of my tests <6> empty_mind: $query[0]->{hotelcode} = 'foo'; <7> so I was hoping for something like $sdi[0..2] <11> ok pravus ks <11> thxs pravus <6> Termy: most of the looping constructs in perl set $_ <7> I guess I could test each element separately <7> pravus, :/ exactly <7> and I want it to stay the same for my purposes <6> Termy: @sdi[0..2] would just be a slice... you'd need to still loop over it <13> Termy: they don't *have* to set $_. You can tell perl to use some other scalar instead <7> pravus, if doesnt set it I think <7> Ill just do $sdi[0] $sdi[1] etc <7> was just wondering if there was a way to shorten that <14> suppose I have a string $str, how do I parse the string line by line and if a line begins with 'foo' do something. <6> PerlJam: ?? even with 'for my $foo ...' $_ would still be set... <7> PerlJam, I dont think I'll do that in this program, but it would be nice to know how I suppose, could you tell me? <6> Termy: you *can* use @sdi[0..2] in a test, but realize that you would be testing the slice and not each individual element <13> pravus: are you sure? <7> pravus, would there be a way to test the elements instead? <7> I'm just trying to get a better grasp of perl too :/ so any shortcuts would be... erm...lovely <6> PerlJam: am i sure of? <13> Termy: well, I kind of came in in the middle so at this point it just looks to me like you are imposing some crazy constraints on yourself for no good reason. <7> PerlJam, I'm just wanting to keep $_ the same <7> so no for loop or anything <6> Termy: by looping or calling a sub that loops <7> but test each element of @sdi <6> Termy: iirc, $_ is local for loops <6> but i could be wrong on that <13> Termy: for loops don't set $_ if you ask them to use some other variable. <13> Termy: show me some code. :-) <6> PerlJam: wow... i didn't know that <7> PerlJam, I ran it in the debugger with for (@sdi) {blah whatever was in here} and $_ was different <7> ok <7> err... one sec <13> Termy: for (@foo) {...} uses $_ implicitly. If you're explicit: for my $f (@foo) { ... } $_ doesn't get clobbered <10> "Termy" at 128.252.233.73 pasted "here you go :)" (29 lines, 721B) at http://sial.org/pbot/18313 <7> whoops, forgot to copy the #!/usr/bin/perl <13> Termy: also, pravus is correct that $_ is localized to the loop, so whatever value $_ had before the loop is the same value it will have after the loop <7> PerlJam, yes, after the loop <7> I need it to be the same in the loop <13> Termy: so stop using implicit variables. <6> Termy: i was wrong... do as PerlJam says and give the for loop a scalar to work with: for my $foo (... <7> pravus, ok :) <13> Termy: change "for (0..$#lines)" to "for my $l (0..$#lines)" and use $l where you currently have $_ <7> where I have $_ everywhere? <7> even $lines[$_]? <13> yes. <7> wow, I learned something :D <13> As you nest your loops, you want to give names to your outter loop variables. It's only your innermost loop that you want to use an implicit variable like $_ <7> thank you :) <13> (typically)
Return to
#perl or Go to some related
logs:
doug stanhope acid bootleg gentoo mysql LinuxThreads Not found #debian #math #css bash script is directory The volume control did not find any elements and/or devices to control. This mea gentoo mod_php disapeared #sdl #perl
|
|