| _stuuf | gah why do i have an _ ? |
| crunge | I'm writing an auditing script and I'd like it so that if it's run from a shell by a person it prints its report to STDOUT if not, it mails the report to a contact address |
| mauke | ew |
| crunge | and now that I say that "out loud" I realize how stupid it is |
| Woosta | crunge: use a command line option |
| crunge | and that I should just make the cron job pipe to mail |
| Bradipo | Ok, the BEGIN block seemed to work. |
| Woosta | Then in your cron: myScript.pl --mail or yes, pipe it to mail from cron :) Bradipo: don't mess with @INC .. use lib |
| crunge | I apologize for my stupid moment. I emptied my smart buffer writing the script :) |
| Bradipo | Woosta: What do you mean? |
| Woosta | Bradipo: as in: use lib '/path/to/lib'; |
| Bradipo | So like: use Module::Name '/path/to/lib'; |
| Woosta | NO |
| Bradipo | lib is a keyword? |
| Woosta | use lib '/path/to/lib'; use Module::Name; |
| Bradipo | Ahh. I see. |
| rhizo | use lib q{/path/to/lib}; use Module::Name; |
| crunge | wow... 18K queries in 30 sec on this caching DNS |
| Bradipo | Thanks for the help, its loading the correct module now. |
| Limbic_Region | someone ask an interesting question - I'm bored |
| LeoNerd | How should I handle SIGCHLD? |
| Limbic_Region | with firm, but loving hands |
| LeoNerd | waitpid( -1, WNOHANG ) and see what I get..? Or, waidpid( $pid, WNOHANG ) on each of the child processes I'm waiting on |
| Limbic_Region | LeoNerd - presumably you need to wait for them all but there is useful work you could be doing while you wait ? |
| LeoNerd | See WNOHANG Namely, I know at least one child died... Do I iterate the child process IDs I'm looking for, to see which, or do I go for -1 to just see what pops out..? |
| Limbic_Region | perhaps you explained more of what you were doing earlier and I missed it (as I just joined) I don't know what you are trying to accomplish in the first place so it is rather difficult to propose a solution if the desired behavior is unknown |
| LeoNerd | I was mainly trying to supply an interesting question :) |
| xbansheex | Updating has not helped. |
| Limbic_Region | oh well |