push @hex_locations, glob("$ptxdist_env->{root}/project/platform-$PLATFORM-$BUILD_SUBTYPE/build-target/gnss-*");
push @hex_locations, glob("$ptxdist_env->{root}/project/platform-$PLATFORM-$BUILD_SUBTYPE/build-target/gps-q6image-*");
push @hex_locations, glob("$ptxdist_env->{root}/project/platform-$PLATFORM-$BUILD_SUBTYPE/build-target/hexagon-infra-*");
push @hex_locations, glob("$ptxdist_env->{root}/project/platform-$PLATFORM-$BUILD_SUBTYPE/build-target/tfcs-*");
is there a better way to do this, like giving it in one single line instead of 4? I had to use glob as it has wildcard at the end, when I try to use it in single line, the glob complains about too many argument.
thanks.
Here are four:
my @hex_locations = (
glob("$base/gnss-*"),
glob("$base/gps-q6image-*"),
glob("$base/hexagon-infra-*"),
glob("$base/tfcs-*"),
);
my @hex_locations = glob(join(' ',
"$base/gnss-*",
"$base/gps-q6image-*",
"$base/hexagon-infra-*",
"$base/tfcs-*",
));
my @hex_locations = map glob("$base/$_-*"),
qw( gnss gps-q6image hexagon-infra tfcs );
my @hex_locations = glob("$base/{gnss,gps-q6image,hexagon-infra,tfcs}-*");