Oh, and would anyone happen to know...
Jan. 22nd, 2004 11:01 pm...what the heck the \ before the variables mean in perl...?
LJ::do_request(\%req, \%res, $flags);
[ edit | 11:10 ]
ah, nevermind, I found it on google.. had to search for "slash before" and perl though. Apparently it's Dereferencing. WTF??? =.= Why the holy flying fuck would you even want to do that? Now, I suppose the memory location would be useful.. but WHY is livejournal calling that when you do post? Why is it sending do_request() the memory location of those hashes (any perl variable that starts with the % is a hash, perl variables that start with @ are arrays, and $ are scalars) instead of the actual value.
I don't comprehend the madness. Fuckit, that's irritating me. Now I need to spend time reading the de_request function. Buggers.
...yeah, I know there was more cursing there than usual, but it irritates me that that wasn't covered in "Learning Perl" ¬.¬ stupid book and stupid llamas.
LJ::do_request(\%req, \%res, $flags);
[ edit | 11:10 ]
ah, nevermind, I found it on google.. had to search for "slash before" and perl though. Apparently it's Dereferencing. WTF??? =.= Why the holy flying fuck would you even want to do that? Now, I suppose the memory location would be useful.. but WHY is livejournal calling that when you do post? Why is it sending do_request() the memory location of those hashes (any perl variable that starts with the % is a hash, perl variables that start with @ are arrays, and $ are scalars) instead of the actual value.
I don't comprehend the madness. Fuckit, that's irritating me. Now I need to spend time reading the de_request function. Buggers.
...yeah, I know there was more cursing there than usual, but it irritates me that that wasn't covered in "Learning Perl" ¬.¬ stupid book and stupid llamas.
no subject
Date: 2004-01-23 12:55 pm (UTC)sending those hash references allows the code in the function to refer to the hashes as if they could be passed whole as discrete arguments.
You probably already found the real answer to your question, but trying to explain things that you think you know is a good way to discover the holes in your knowledge, if you're honest. So I try to do it whenever possible.
no subject
Date: 2004-01-23 04:21 pm (UTC)(looking back at the code, I guess it was... they use -> (ie. $req->{'event'})... should have noticed that and made a connection... instead of $req{'event'})
btw, do you know of any good perl books that you can recommend? I'm reading Learning Perl from O'Reilly right now, but it covers a lot of the basic stuff that I've already picked up from writing a perl based AIM bot to post on my livejournal server and a perl script to open and read files and post them online.... and Learning Perl moves a bit too slowly for me...
no subject
Date: 2004-01-26 05:19 am (UTC)no subject
Date: 2004-01-26 05:38 am (UTC)