Help for this page

Select Code to Download


  1. or download this
    sub string_to_struct {
     my $string = shift;
    ...
    
     return eval "\\$string"; # a ref, for reasons to do with not failing 
    +if eval "\$string" would be an array, hash, hashref etc.
    }