Re: Which is better?

2005-10-16 Thread M. Lewis
Thanks Thomas. Appreciated. Thomas Bätzler wrote: Hi, M. Lewis <[EMAIL PROTECTED]> asked: Charles K. Clarkson recently replied to Sreedhar Reddy in which one of the corrections he made was: open my $fh, '<', $input_file or die qq(Cannot open "$input_file": $!); [...] When I have opene

RE: Which is better?

2005-10-16 Thread Thomas Bätzler
Hi, M. Lewis <[EMAIL PROTECTED]> asked: > Charles K. Clarkson recently replied to Sreedhar Reddy in > which one of the corrections he made was: > > open my $fh, '<', $input_file or die qq(Cannot open > "$input_file": $!); [...] > When I have opened a file, I have always done: > > open (FILE,

Which is better?

2005-10-16 Thread M. Lewis
Charles K. Clarkson recently replied to Sreedhar Reddy in which one of the corrections he made was: open my $fh, '<', $input_file or die qq(Cannot open "$input_file": $!); It seems that Charles' habits are to prevent excess typing and to 'be lean on variables' as he phrased it I believe. W

RE: I need help here

2005-10-16 Thread Sreedhar reddy
Hi Charles, I am really thankful for your detailed explanation. I will try to gain as much as I can from this mail. With Regards, Sridhar Reddy T. -Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Monday, October 17, 2005 12:15 AM To: 'Perl Beginners' S

RE: config parser

2005-10-16 Thread Charles K. Clarkson
Beast wrote: : To avoid hardcoding parameter in program, Im trying to make a separate : file for config. : However its not as simple as key/value which can be easily parse using : split. : : It is something like group of parameter, ie: : : group = marketing : recipient

Re: config parser

2005-10-16 Thread John W. Krahn
Beast wrote: > > To avoid hardcoding parameter in program, Im trying to make a separate > file for config. > However its not as simple as key/value which can be easily parse using > split. > > It is something like group of parameter, ie: > > group = marketing > recipient = [EMAIL PROTECTED] > re

Re: perl equivalent of ps

2005-10-16 Thread John W. Krahn
Christopher Spears wrote: > Does Perl have the equivalent of ps in Unix? No. > I've looked in my Programming Perl book, and I could only > find getpgrp, which does the opposit of what I want to > do. Here is a schematic of what I want to accomplish: > > 1) Search ps aux and locate process PROC.

Re: config parser

2005-10-16 Thread Chris Devers
On Mon, 17 Oct 2005, Beast wrote: To avoid hardcoding parameter in program, Im trying to make a separate file for config. However its not as simple as key/value which can be easily parse using split. Why not ? A crude split might fail, but splitting on / = / should work for the format you de

config parser

2005-10-16 Thread Beast
To avoid hardcoding parameter in program, Im trying to make a separate file for config. However its not as simple as key/value which can be easily parse using split. It is something like group of parameter, ie: group = marketing recipient = [EMAIL PROTECTED] recipient = [EMAIL PROTECTED] sub

RE: I need help here

2005-10-16 Thread Charles K. Clarkson
Sreedhar reddy wrote: : Hi Charles, : : : This is the code which I have written to finish my small task... Oh. So I actually had the whole thing to begin with. Sorry about that. Your script is using a different set of variables than the ones we would like to se

RE: helping writing a script

2005-10-16 Thread Charles K. Clarkson
Juan B wrote: : Hi guys ! : : I have four html pages. within eack one I have a firewalls : logs.I need to write a script that will search all the ip : address after the work "from: and wrote tham in a file and if : the ip is written already in the report file so dont writ

Re: perl equivalent of ps

2005-10-16 Thread Edward WIJAYA
On Sun, 16 Oct 2005 22:14:05 +0800, Christopher Spears <[EMAIL PROTECTED]> wrote: Does Perl have the equivalent of ps in Unix? Check out Proc::ProcessTable module They have nice API for it. or can you try this? perl -e'print `ps --no-header -p$$ -osz`' This is just an example snippet to

perl equivalent of ps

2005-10-16 Thread Christopher Spears
Does Perl have the equivalent of ps in Unix? I've looked in my Programming Perl book, and I could only find getpgrp, which does the opposit of what I want to do. Here is a schematic of what I want to accomplish: 1) Search ps aux and locate process PROC. 2) Get PROC's PID. 3) Use the PID to kill

helping writing a script

2005-10-16 Thread Juan B
Hi guys ! I have four html pages. within eack one I have a firewalls logs.I need to write a script that will search all the ip address after the work "from: and wrote tham in a file and if the ip is written already in the report file so dont write in again. please help me on this or give me some

RE: Sending HTML file as mail from mail command (mail -s )

2005-10-16 Thread Timothy Johnson
Thank you for that sage advice about Perl. -Original Message- From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] Sent: Sat 10/15/2005 9:17 AM To: beginners@perl.org Cc: Subject: Re: Sending HTML file as mail from mail command (mail -s )