use strict;
use Data::Dumper;
my $data = 'O{bTyp | S{WCS-STD}bUsr | S{GONZALO}bUid | S{REP.352637}sId
| A{}sNme | S{}sUrl | S{}sLbl | S{}sCok | S{}mMsg | S{Welcome to the
customer service area of our web site.}fAct | S{}fTyp | S{}fKey |
S{}fVal | S{}}';
my %hash;
foreach my $item ( split / \| /, $data ) {
my($value,$key) = $item =~ /.{(.+?)}(.+)/;
$hash{$key} = $value if length $key;
}
print Dumper \%hash;
__END__
$VAR1 = {
'sId' => 'REP.352637',
'bUid' => 'GONZALO',
'bUsr' => 'WCS-STD',
'fAct' => 'Welcome to the customer service area of our web
site.'
};
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web