http://www.perlmonks.org?node_id=246380


in reply to grabbing .lic files

This line probably causes you some grief:
$x =~ s/.lic/;
You'll probably get a Substitution not terminated at... error I would imagine. You probably meant to do this:
$x =~ s/.lic//;
-- vek --