@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
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



Comments:

<0> but I don't know of it
<0> web servers don't usually have "users", either
<1> yeah, I know perl stores hashes of server info somehow, wasn't sure
<0> mod_perl allows you access to apache's guts with a perl API
<0> I wouldnt' say that "perl stores hashes of server info"
<2> tybalt!
<0> daveman! WAIT! I'm not tybalt!
<0> ****
<3> hi Daveman
<1> never used mod_perl probably get around to it some day, thanks anyway
<0> jlamr: nothing stopping you from parsing some logs, calling some `ps` and whatever.. the things you are asking for don't really make sense.. "free space" in a web server/
<0> ?
<0> users?
<0> it doesn't sound to me like you really know what you want
<0> sounds like you want both a system monitor and a log parser type thing
<0> both of which, of course, exist



<3> if it's a Linux box, some of that is available in /proc
<0> google would find them, I'm sure
<4> munin? cacti? nagios? monit?
<1> yeah I wasn't clear, by server, I meant my debian box, which is running apache
<0> http://xaxxon.slackworks.com/rsapi/ <-- collation of how to get system data on all sorts of UNIX-like machines
<5> http://bhami.com/rosetta.html
<1> wanted to display that info on an html page, so I figure perl cgi, but wan't sure where to start
<0> rmah: except my link is programatic, not command line
<0> rmah: (though I admit I pretty much just called strace on those commands)
<6> jlamr: start with "print" :)
<0> or even "print('\r\n\r\n')"
<0> err.. throw in a content-type: text/html
<0> don't
<0> d'oh
<0> wow, engage brain before fingers.. holy cow
<0> or even "print('content-type: text/html\r\n\r\n')"
<6> and then remove the parentheses so it looks like perl ;)
<1> I'm a little past that?
<0> *sigh*
<0> hobbs: I'm writing my first programming language in perl.. and it's so weird switching back and forth.. my language requires print("...") -- the parens
<0> i'm writing my first programming language.. and it happens to be in perl
<0> and so I get confused as to what langauge I'm writing because mine looks a lot like perl sometimes.. but othertimes not so much
<7> then make it print "..." so perl interprets the \n and \r
<0> errr?
<0> '...' is fine
<6> no
<0> "..." is for variables
<0> wha?
<0> whoa
<6> eval: ["test\ting", 'test\ting']
<8> hobbs: Return: ['test ing','test\\ting']
<0> ok
<7> :)
<0> learned something new today.. that I should have known a long time ago
<1> I'd be happy for now if I could capture system 'df -h'; and throw it on an html page, no luck capturing stdout tho
<6> XaXXon: perl single quotes are only slightly less restrictive than sh single quotes
<0> print `df -h`; ???
<7> my $output = `df -h` ?
<6> XaXXon: the only escapes that are legal in a '' string are \' and \\
<0> hobbs: I guess that makes sense
<0> jlamr: I'd suggest <pre></pre> tags around it...
<2> tybalt, can you write a one-liner that read-tests files?
<0> or setting it to a fixed width font in one of the other 230948 ways
<0> read test?
<0> amnesiac: weren't you just here?
<3> "read test" ?
<9> no
<1> is [code]my $output = `df -h`;[/code] a valid perl statement, seems to be missing something...
<0> *sigh* the correct answer was "I don't remember"
<4> there's a module on CPAN that does that better, jlamr
<0> looks fine to me
<10> jlamr, should work.
<11> You could check syntax validity yourself with perl -c
<11> That's obviously not your actual question
<1> well I'll start there, and move to the module lateron, thanks for the pointers all...
<12> hi hi hi hi hi hi hi
<13> japhy waphy
<14> if i wanted to search a file for a string, what would be the best way to do it?
<12> teratogen weratogen
<12> drag|on: open the file, and check each line for the string?



<11> drag|on: The grep executable.
<14> hmm
<14> i tried grep
<14> it didnt seem to work
<0> haha
<0> maybe your file doesn't have thes tring?
<12> drag|on: grep() in Perl is not like Unix's grep
<12> and Unix's grep works properly
<9> sili, n00b
<0> hence "the grep executable"
<12> so if Unix's grep didn't work right, you didn't use it right.
<14> well, i was using the grep executable ;/
<0> drag|on: why do you think your file HAS the string?
<14> because i looked in it?
<12> drag|on: then you're doing something wrong
<0> then you're doing something wrong
<12> STOP COPYING ME
<0> stop.. uhh.. copying me
<12> oh, real original.
<14> eh
<0> *pout*
<1> jenious
<14> well, its tricky
<2> tybalt, just something to bit-by-bit read a given set of files, to confirm that it's all readable, etc or something... :P
<2> Hi japhy
<12> how is it tricky, drag|on? stop being ambiguous and give us a concrete example
<0> drag|on: is your string have newlines or other oddities?
<12> hey dave
<2> japhy, you off to a good week?
<0> woohoo japhy! tell it, brother!
<14> cerr
<14> im such an idiot
<0> yeah
<14> ignore me
<0> we knew that
<0> we were getting to that
<14> and ignore xaxxon while your at it
<11> He's really searching porn for boobs. What he doesn't know is that we've switched his regular morning porn for fake inspiration posters. Let's watch.
<12> Daveman: except for the fact that my boss makes me add features he had me remove a couple weeks ago... yeah
<0> drag|on: they already do
<2> japhy, typical... :\
<14> i had an s in the string that my mind refused to see /
<2> japhy, that's why I've learned to comment them out! :D
<12> drag|on: congrats for your epiphany.
<0> drag|on: condolences on having to have it
<2> either that or just tag them with a togglable flag or something :P
<2> haha
<2> friggin' management
<12> Daveman: well, these changes involved changes to the database
<12> I can't ****ing stand it
<12> and then he goes and puts commas in numbers.
<11> so?
<12> why? numbers don't need commas. they don't want them. it's more work for HIM to put them in, making more work for ME to remove them
<10> why would a number have a comma in it? commas separate lists...
<15> 1,000,000.00
<11> Pete_I: They separate thousands.
<12> and I hate PHP. I wish PHP had a DBI like Perl.
<12> sooooo badly.
<10> what? people can't count? place values?
<12> placeholders. please, for the love of God, Mr. PHP, add placeholders.
<11> Pete_I: With nine zeros in a row? No.
<10> hmm
<10> 1_000_000_000
<10> prettier than commas.
<0> 1,000,000
<11> Not really.
<12> commas are a display issue. they're not part of the data!
<12> don't put them in the data!
<11> indeed
<12> I don't mind displaying the numbers with commas in them. that's fine.
<10> yep
<12> anyway. it all comes down to: I write ****ty PHP code because it doesn't have placeholders like Perl's DBI does and because PHP ****s
<12> I've tried writing "good" PHP code. it's really ****ing hard.
<1> I don't get why everyone bashes PHP, but yet it's everywhere...


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#oe
#gaim
forward zone origin bind
making unicode using numpad
#perl
cynthiune sucks
#linux
etch interfaces hotplugs
gentoo iptables default rules-save
all-in-wonder tuner xorg



Home  |  disclaimer  |  contact  |  submit quotes