Hi all,
Let say I have 2 files, 1 is source file and another is destination file.
Source file contains the following :
Kitten
Dogs
Donkey
Chicken
Turkey
And destination file contains :
Kitten, 0
Dogs, 0
Donkey, 0
Chicken, 0
Turkey, 0
Kitten, 0
Dogs, 0
Donkey, 0
Chicken, 0
Turkey, 0
Kitten, 0
Dogs, 0
Donkey, 0
Chicken, 0
Turkey, 0
What I want is to have destination file contains the following after the script is run :
Kitten, 1
Dogs, 2
Donkey, 3
Chicken, 4
Turkey, 5
Kitten, 1
Dogs, 2
Donkey, 3
Chicken, 4
Turkey, 5
Kitten, 1
Dogs, 2
Donkey, 3
Chicken, 4
Turkey, 5
Can anybody help to create UNIX/Perl script that could read from source file using loop and change values in destination file as above? Pls help