#!/usr/bin/perl use strict; use warnings; my %record_for; while (<DATA>) { chomp; my ($key, $val) = /\{(\w+)\}\s*?(\w+)/; $record_for{$key} = $val; } print join ',', map { $record_for{$_} } keys %record_for; __DATA__ {NAME} John {AGE} 35 {SEX} M {ADDRESS} USA
In reply to Re: Assign value
by bichonfrise74
in thread Assign value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |