How do I improve my Perl regex to handle the __DATA__
below?
my ($type, $value) =~ /<(\w+)\s+(.*?)\(\)>/;
__DATA__
<dynamic DynamicVar>
<dynamic DynamicVar > # not need attache the blackspace to $value when return
<dynamic DynamicFun()>
<dynamic DynamicFun() > # not need attache the blackspace to $value when return
I want to return the $type
and $value
as this format <$type $value>
.