in reply to Re^2: Pushing to an array
in thread Pushing to an array

You issue is that $mk does not contain the string ./media/common/max/tail/common.mk:    $(PROJECT_ROOT)/../../Utils/inc as you expect. Variables interpolate in double quotes (see Quote and Quote like Operators), so you are interpolating the special variable $( in your string. You can resolve your issue by either escaping the $ character with a back slash

my $mk = "./media/common/max/tail/common.mk:    \$(PROJECT_ROOT)/../../Utils/inc";

or you can swap to string delimiters that do not interpolate, like single quotes

my $mk = './media/common/max/tail/common.mk:    $(PROJECT_ROOT)/../../Utils/inc';