Loading ...
Sorry, an error occurred while loading the content.

Run a Perl script W/argument?

Expand Messages
  • craig.kelly@gm.com
    Hi, all I ve just subscribed to this group, so please forgive me if this is a tired topic. I m using v4.82 on WinNT, and ActiveState s Perl 5. I want to run a
    Message 1 of 1 , Aug 10, 2000
    • 0 Attachment
      Hi, all
      I've just subscribed to this group, so please forgive
      me if this is a tired topic. I'm using v4.82 on WinNT, and
      ActiveState's Perl 5.

      I want to run a Perl script with a command-line argument,
      as in "perl project.pl 1.5". The number is used to do some
      math with values regex'ed out of selected text.

      Below is what I tried, doesn't work. Is there any way
      to pass an argument to a Perl script?

      001 H="Project a Measurement"
      002 ^!Set %myarg%=^?[Distance to Project?]
      003 ^!RunPerl Perl project ^%myarg%

      005 H="_Perl project"
      006 # project.pl
      007
      008 # $dist = $ARGV[0]; # this what I _want_ to do
      009 $dist = 1.5; # instead of this.
      010
      011 # lotsa Perl...

      TIA for any help -
      Craig
    Your message has been successfully submitted and would be delivered to recipients shortly.