#perl
13 October 2007
Total 39 pages. You are browsing page 2/39.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
00:28 <****> yeah I know
00:28 <****> convivial: splice
00:28 <****> there is a function to do that
00:28 <****> preaction - delete doesn't really delete on an array
00:29 <****> aww
00:29 <****> better to use splice
00:29 <****> k
00:29 <****> thanks
00:29 <****> well i gonna sleep right now
00:29 <****> You can "delete" an element of an array, but if it's not the end one, that's just the same as undef'ing it
00:29 <****> good bye everybody! :)
00:29 <****> To actually remove it, and make the others slide down one, use splice
00:29 <****> cya garulfounix!
00:30 <****> eval: @a = 1 .. 5; delete $a[3]; \@a
00:30 <****> Er... where'd the eval bot go?
00:30 <****> eval: "Right here"
00:30 <****> BUUUUUUUUU
00:30 <****> @{ [ grep $_ != $delete_this] }
00:30 <****> buubot is in the channel..
00:31 <****> anno-: Ahh.. the shoppingcart operator
00:31 <****> maybe the netsplit killed it
00:31 <****> perhaps
00:31 <****> it's still here
00:31 <****> yeah, but not responding
00:31 <****> buubot: jerk it
00:35 <****> buubot, jerk it
00:35 <****> is there a built in for newline character? example, print $key.Newline; ?
00:35 <****> "\n"
00:35 <****> ok.
00:35 <****> I bought a very lovely new small-batch Whiskey distilled in Pennsylvania called Michter's. It is exceptionally good and not very expensive.
00:35 <****> convivial, there is the -l switch, like perl -l, for one-liners. handy
00:36 <****> Yaakov, woo hoo alcohols!
00:36 <****> ok thanks
00:36 <****> hi *. I need to confirm behaviour of the getlogin() function. If you are using LDAP as your authentication backend, does getlogin() return the proper response or should I be getting a null value?
00:36 <****> Yaakov, hey, are religious Jews allowed to drink? what's the deal with that? just curious
00:37 <****> whi doesn't this work? $fields[$i + 1] =~ s/:.*/:$sizes{$key}/ . " Preallocate:".$sizes{$key}."\n";
00:37 <****> rei_0000: if your nsswitch is set up right, it should return the proper value
00:37 <****> it didn't add " prealloc..." to $fields[$i+1]
00:37 <****> rei_0000: (as it's just getpwuid)
00:37 <****> No getting plastered.
00:37 <****> convivial, put the regular expression on its own line?
00:37 <****> Yaakov, aha, figured
00:37 <****> rei_0000: but test it :)
00:37 <****> iank: I'll take a look and see if it's just nscd being a bitch
00:38 <****> but I used the '.' but ok.
00:38 <****> rei_0000: nscd is /always/ a bitch.
00:38 <****> iank: point
00:38 <****> convivial, don't try to cram everything into one line anyway, for readability reasons...
00:38 <****> rei_0000: it works for me here, on an ldap/kerb system
00:38 <****> but I just needed to confirm this as I was getting a null from the perl one liner I did in my shell to test
00:38 <****> ok
00:39 <****> as I'm trying to nuke a lame call to `id -un`
00:39 <****> (no, not my code, working on fixing someone elses)
00:39 <****> hey, $array[$i] .= "..."; works!
00:39 <****> :)
00:39 <****> koolies
00:40 <****> rei_0000: you could always use getpwuid($<)
00:40 <****> hmmm, k
00:40 <****> convivial, naturally! :-)
00:40 <****> lemme see if that is busted first :P
00:40 <****> Chris62vw :))
00:40 <****> I'm starting to fall in love with perl!
00:40 <****> i'm in luv!
00:41 <****> hmmm
00:41 <****> Perl is a harsh mistress.
00:41 <****> perl is prone to domestic abuse
00:41 <****> Perl is friendly !
00:41 <****> Get out while you can.
00:41 * rei_0000 is thinking that some idioten broke our perl here :
00:41 <****> :|
00:41 <****> :S
00:42 <****> getpwuid($<) returns a null value too
00:42 * rei_0000 is NOT happy
00:42 <****> thanks for helping confirm another bug in the distro I'm on
00:42 <****> Yeah, that shouldn't happen -_-
00:42 <****> does perl use bytecode like java?
00:43 <****> no
00:43 <****> yes
00:43 <****> maybe
00:43 <****> depends
00:43 <****> a little!
00:43 <****> LOL
00:43 <****> sometimes
00:43 <****> almost never
00:43 <****> when running
00:43 <****> only stopped
00:43 <****> if you wish hard enough
00:43 <****> What was the question?
00:43 <****> does perl precompiles scripts first into something and then runs them?
00:44 <****> yes
00:44 <****> no
00:44 <****> LOL
00:44 <****> yes
00:44 <****> iank: weird... when I remove the invokation of warnings on the one liner, it works....
00:44 <****> I'm just curious, but what does it compile it into?
00:44 <****> convivial, yes.
00:44 <****> answer hazy, ask again
00:44 <****> perl compiles into a parse tree, then runs the tree directly
00:44 * rei_0000 will not begin to understand why perl did that...
00:44 <****> oh ok.
Total 39 pages. You are browsing page 2/39.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
