 How to handle mixed blankspace and () in perl regex ?
How to 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>`. 



 How to handle mixed blankspace and () in perl regex ?
===

How to 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>`. 


