On Jun 16, 2004, at 2:25 PM, Naser Ali wrote:
Thanks James,
I totally agree with you and appreciate your comments.
I was going to refine the whole code by putting in better logic, naming
convention, and error handling. I just posted the code baically to share the
basic logic of handling the situation. I also did not use the correct
wording as you pointed out that "$#array" is the last index not the size. I
ll be more carefull with the wording as well to show my understanding of the
matter.
I ll definitely be more careful next time. You are right it is good to get
in this habbit.
Much appreciated your comments and guidance.
I meant to do this earlier, but my wife wisked me away on a surprise vacation for my birthday. ;) I'm sure you've about forgot this code by now, but...
Just for comparison, I wanted you too see how I might go about writing the script you did (since I just gave general tips last time).
The code below should do something similar to what you posted. Maybe it'll give you some ideas.
James
#!/usr/bin/perl
use strict; use warnings;
while (<>) { # call with perl script_name input file name print if m/Products/..m/System Totals/; }
__END__
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>