! TITLE: perl_check.mac (MANAGEMENT) ! ! ! OBJECTIVE: ! ! This macro checks to see if perl is installed and running properly. ! ! ! COMMAND SYNTAX: ! ! PERL_CHECK ! ! ! ARGUMENTS: ! ! None ! ! ! DESCRIPTION: ! ! Some of the tools use Perl to give APDL extended capability and speed ! enhancements. To ensure that macros which use Perl run properly, this ! macro should be placed in the startXX.ans file. Then every time Ansys ! starts up a quick check will be made to ensure that the OS and Ansys are ! configured properly for running Perl. This macro issues a warning ! message if it cannot run Perl and get correct results from it. ! ! This macro checks to make sure arguments can be properly passed to a ! Perl script and that the script returns the correct result. ! ! For help configuring Perl on the Windows platforms, refer to the following ! web pages: ! ! http://btdt.org/prog/ansys/perl_calls/ ! http://btdt.org/prog/ansys/apdl/config/ ! ! For the UNIX and Linux platforms just be sure that the first line in ! each Perl script points the correct location of the Perl interpreter. ! ! NOTE: If Perl scripts cannot be run, the flag "_have_sys" is set to zero ! so that macros can check to determine if external programs can be run or ! not. If Perl scripts and other external programs cannot be run, logic can ! be placed in the macro to run an equivalent APDL version instead. ! Refer to par_array.mac for an example. ! ! /nopr perl_arg=2.5 /syp,runperl.bat perl_check.perl,perl_arg parres,change,perl_check,out *if,perl_arg,ne,5,then perl_help *else /sys,runperl.bat perl_check.perl -2.5 parres,change,perl_check,out *if,perl_arg,ne,-5,then perl_help *else *msg,info Perl Checks Out OK. *endif *endif *set,perl_arg /go