Thanks for the response.
Any idea, why i'm getting this error :
Global symbol "$fh" requires explicit package name at cgrpioneer.pl line 7.
I even added the following line, but still the same.
my $fh;
Thanks, Pamela Honeycutt
In the example there, $fh is the filehandle you want to read from. You should open my $fh, '<', "somefile.txt" or die $!; somewhere earlier in the program.
PS: Simply saying that you added my $fh; doesn't help. You need to show the code, or the problem could be anything anywhere.