Calling Perl scripts from SPECTRA

SPECTRA> perl file.pl [arg1 [arg2 ...]]

The @ARGV array passes the command line arguments to the script. Information can be transferred in the opposite direction by symbol definitions:

  #!/usr/bin/perl
  #
  # this script demonstrates how the command line arguments can be
  # accessed and how some information is fed back to Spectra
  #
  # Usage: 
  #
  #  SPECTRA> perl hello_world.pl 1 2 3
  #
  use Spectra; 

  my $status = 1;

  print "\n Hello world \n\n"; 

  $len = @ARGV; 
  print " The list of command line arguments: @ARGV, length = $len\n"; 

  $SYM{ RETURN_VALUE} = "@ARGV" if $len; 

  prtc(); 
  $status;

The function prtc() is resolved by the Spectra.pm module.