in reply to Re: Accessing value from a hash table in perl
in thread Accessing value from a hash table in perl
I have to read each file from the directory and process the data and write the result to separate output files which looks like# this is a new file { date 14/07/2016 time 11:15 end 11:20 total 30 No "FRUITS" Fruit_Class { Name "fruit 1" fruitName "apple.fru" fruitId "0" fruitCount 5 fruitValue 6 } { Name "fruit 2" fruitName "orange.fru" fruitId "1" fruitCount 10 fruitValue 20 } }
The fruit_Class has to be added at the beginning of each {}.How can i each achieve this.I have to use hash(key,value) concept. Any help would be much appreciated.# this is a new file {date 14/07/2016 time 11:15 end 11:20 total 30 No FRUITS Fruit_Class { Name fruit_1 fruitId 0 apple_fru.fruitCount 5 fruitValue 6 } Fruit_Class { Name fruit_2 fruitId 1 orange_fru.fruitCount 10 fruitValue 20 } }
|
|---|