in reply to Help in building Regular expression

Here is one way, using tr and substr (without using regular expressions):
use warnings; use strict; while (<DATA>) { tr/-abcdef/9012345/; print substr($_, 0, 10); print "\n"; } __DATA__ a81f9284-b353-430a-a8ce-85b8118d3f3e
See also (documentation available at your command line via perldoc):

To grab the output of an external command, such as uuidgen, you should use qx instead of system.