Smarts: How to run sm_perl scripts as executables; After adding the path to sm_perl into the Perl script shebang (#!), the script produces several errors such as "command not found"
book
Article ID: 323803
calendar_today
Updated On:
Products
VMware Smart Assurance
Issue/Introduction
Symptoms:
How to run Smarts sm_perl scripts as executables How to run Smarts Perl script without calling sm_perl directly
After adding the path to Smarts sm_perl into the Perl script shebang (#!), the script produces several errors, such as the following:
use: command not found
Environment
VMware Smart Assurance - SMARTS
Resolution
To run Smarts sm_perl scripts as executables, you can use a pattern suggested on the perlrun doc from perl itself (perldoc perlrun). This is done as follows:
Add the following as the first line in your Perl script: