in reply to regex ???

Ok. First off, a general suggestion - don't use something unless you need to. Why is this important? Cause you're using the /g modifier. You don't need it.

The second thing is that your expression needs to be

my ($data) = $fileinfo =~ /^(.*?)\*{4}/s;
You need to localize $data (if you want to be strict-compliant, which is a "Good Thing"(tm) ...). You also need to put $data in array context, because the match-regex returns a list, not a scalar.

------
/me wants to be the brightest bulb in the chandelier!

Vote paco for President!