in reply to Re^3: Assign value
in thread Assign value

#!/usr/bin/perl use strict; use warnings; my $names; my %names; while(<DATA>){ if(/{(.*)}/){ $names = $1; print $names; } } __DATA__ {NAME} {AGE} {SEX} {ADDRESS}
While printing the $names,
The values should be John 35 M USA.
The values are not present in the input.
So i have to create a hash map and assign the values.