how to run perl script insolarwinds

I have no idea about perl script, i would like to create a template with perl script running....simply a linux command , systemctl is-active [service name]....in order to return if a service is running or not ....

how can I do that..

thanks

Alan