Re: Parameters in command line

From: John Bokma (postmaster_at_castleamber.com)
Date: 02/20/05


Date: 20 Feb 2005 22:37:48 GMT

A. Sinan Unur wrote:

> John Bokma <postmaster@castleamber.com> wrote in
> news:Xns96039C7D6183Fcastleamber@130.133.1.4:
>
>> Brian McCauley wrote:
>>
>>> yusufdestina wrote:
>>>
>>>> Can someone point me to a direction for this?
>>>> I have an application that opens another perl execuatable file.
>>>> [PAR] How can I pass vars to the perl appl.?
>>>> ex: testfile.exe name=value ...
>>>
>>> It it confusing to use an .exe suffix on a Perl script.
>>
>> Read a bit more about PAR and pp and then you understand.
>
> I am not so sure the answer to the OP's question has anything
> whatsoever to do with PAR.

Oh, I didn't say that. Only that what comes out of pp *has* an exe
extension.

> There are two possibilities:
>
> 1. testfile.exe's source is under the OP's control. In this case,
> brian's advice applies.

Why? It's perfectly valid, legal, etc. to just call a perl script, or
perl2exe exe or pp generated exe.

> 2. testfile.exe's source is not under the OP's control. In this case,
> the original language testfile.exe was written in and the fact that it
> was compiled with PAR becomes irrelevant.

True.

> If testfile.exe does expect
> and handle parameters specified on the command line, then the OP can
> use the system function to do so.
>
> If testfile.exe is not designed and written to expect command line
> parameters, then it is not possible to pass command line parameters to
> testfile.exe.
>
> To sum up,
>
> If (1) applies, refactor code as per Brian's suggestion.

If it ain't broke.... Why refactor if you can just call it with system?

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


Relevant Pages

  • Re: GENERAL: Formatting text in Linux?
    ... >>> You have to do it one paragraph at a time, ... >>> individual paragraphs with a single command. ... piped to par w50 with the! ... Here are some useful links about vi macros: ...
    (comp.editors)
  • Re: Passing a Date parameter to a Parametrized query
    ... Dim command As ADODB.command ... > The message still saying data type mismatched... ... >> Dim par As ADODB.Parameter ... >> Set par = New ADODB.Parameter ...
    (microsoft.public.access.modulesdaovba)
  • Re: speed comparison of Perl to exe solutions
    ... ActiveState, Par or one ... DLLs like the Perl DLL. ... article on PAR which also talks about techniques for reducing the exe ... PAR should be a bit slower in the start-up phase. ...
    (comp.lang.perl.misc)
  • Re: PAR and pp
    ... It's hard to say for sure, but are you sure you installed PAR? ... this command will install it for you (it will let you ... then you probably don't have the Perl bin directory in your %PATH%. ...
    (comp.lang.perl.misc)
  • Re: Parameters in command line
    ... > Read a bit more about PAR and pp and then you understand. ... testfile.exe's source is not under the OP's control. ... system function to do so. ... If testfile.exe is not designed and written to expect command line ...
    (comp.lang.perl.misc)