Re: I want to know the reason

2009-12-05 Thread John W. Krahn
Parag Kalra wrote: Hello All, Hello, This code is working: #!/usr/bin/perl use warnings; use strict; You should include those two pragmas to let perl help you find mistakes in your code. 2 my @column_names=(A..ZZ); Why are you creating an array with 702 entries when you are only

Re: I want to know the reason

2009-12-05 Thread Parag Kalra
Thanks to all... I was not knowing such a basic thing... :) Cheers, Parag On Sat, Dec 5, 2009 at 5:19 PM, Paul Johnson wrote: > On Sat, Dec 05, 2009 at 04:46:38PM +0530, Parag Kalra wrote: > > Hello All, > > > > This code is working: > > > > #!/usr/bin/perl > > > 2 my @column_names=(A..Z

Re: I want to know the reason

2009-12-05 Thread Paul Johnson
On Sat, Dec 05, 2009 at 04:46:38PM +0530, Parag Kalra wrote: > Hello All, > > This code is working: > > #!/usr/bin/perl > > 2 my @column_names=(A..ZZ); > > 3 for(my $i=0; $i<26; $i=$i+1) { > > 4 my $tmp_file = "$column_names[$i]".".out"; > > 5 open $i, ">column_names/$tmp_file" o

Re: I want to know the reason

2009-12-05 Thread Philip Potter
2009/12/5 Parag Kalra : > But this code is not working: > > #!/usr/bin/perl >> my @column_names=(A..ZZ); >> for(my $i=0; $i<26; $i=$i+1) { >>     my $tmp_file = "$column_names[$i]".".out"; >>     open $column_names[$i], ">column_names/$tmp_file" or die "Could not >> create the file - $tmp_file \n";

I want to know the reason

2009-12-05 Thread Parag Kalra
Hello All, This code is working: #!/usr/bin/perl > 2 my @column_names=(A..ZZ); > 3 for(my $i=0; $i<26; $i=$i+1) { > 4 my $tmp_file = "$column_names[$i]".".out"; > 5 open $i, ">column_names/$tmp_file" or die "Could not create the > file - $tmp_file \n"; > 6 print $i "This is