in reply to Re^4: How to transform the data with Perl
in thread How to transform the data with Perl---Solved !!!
Thanks for fixing the post and welcome to PerlMonks!
Congratulations on getting your program to work! Since you've said comments are welcome, I'd like to give you some feedback that will help you in future programs.
use strict; use warnings;
Declaring your variables will save you a great deal of time. It is particularly good at preventing mistakes caused by assigning values to a variable using one name and then later on working with the variable using a slightly different name. For example, you might start your script using $counter_A and later on use $cuonter_A, $counter_a, $counter_1, $Counter_A or any other number of small variations. The combination of strict and variable declarations would prevent that.my $file =... open (TEMP, $file) or die("Error: cannot open $file\n"); my $outfile =...
Best of luck on your programming journey (all of 36 hours so far!) and welcome again to PerlMonks!
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: How to transform the data with Perl
by hujunsimon (Sexton) on Oct 06, 2009 at 11:05 UTC |