my @hex_locations = (\"$FindBin::Bin/../../../project/platform-fsm9900_cdp-full/build-target/gnss-1.0.0\", \"$FindBin::Bin/../../../project/platform
Can't you just use glob:
my @files = ;