To install MQSeries Perl Extension for IBM WebSphere MQ, you need to first install MQSeriesSDK along with MQSeriesRuntime and MQSeriesClient. Without the SDK, Perl Extension won't be installed.
If result of a function is needed more than once then don’t call that function multiple times. Save the result of that function in a variable and use that variable instead.