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

Thanks. I was thinking about what the keyword for 'values' was but just totally forgot about it. Anyway, thanks again.

Replies are listed 'Best First'.
Re^4: Assign value
by Anonymous Monk on Nov 05, 2009 at 04:28 UTC
    #!/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.