in reply to Re: File handling in Perl
in thread File handling in Perl

Thanks for your reply Dave..I have make the script as below: #!/usr/bin/perl -w open (FH, "file1"); $array = <FH>; @array1 = split(/ /, $array); open (FH, "file2"); $array2 = <FH>; @array3 = split(/ /, $array2); $count = 1; while ($count <= @array1){ print "$array1$count - 1 = $array3$count - 1\n"; $count++; } vikky@vikky:~$ perl file.pl a = 10 b = 20 c = 30 d = 40 only problem is last one is not coming correct.Can you please let me know what i'm doing wrong here

Replies are listed 'Best First'.
Re^3: File handling in Perl
by perladdicted (Initiate) on May 26, 2014 at 12:15 UTC
    Its fixed missing the chomp.....thanks all