How to start some file as Perl script argument?

Discussion in 'Perl Misc' started by max, Jan 31, 2007.

  1. max

    max Guest

    How to start some file as Perl script argument?
    Start with perl script + argument

    Eg.
    File is someexcel.xls
    How to start it as
    perlscript.pl someexcel.xls
    I have more *.xls file in work folder.

    Thanks
     
    max, Jan 31, 2007
    #1
    1. Advertising

  2. max wrote:
    > How to start some file as Perl script argument?
    > Start with perl script + argument
    >
    > Eg.
    > File is someexcel.xls
    > How to start it as
    > perlscript.pl someexcel.xls


    By typing "perlscript.pl someexcel.xls"?

    > I have more *.xls file in work folder.


    Either loop over all files and call your script for every file or modify
    your script to accept multiple files and work on each of them and then
    type "perlscript.pl *.xls".


    But only the second solution slightly touches Perl programming.
    Your question is, most likeley, os-specific.
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
     
    Josef Moellers, Jan 31, 2007
    #2
    1. Advertising

  3. max <> wrote:

    > How to start some file as Perl script argument?



    What does "start some file" mean when you say it?

    You cannot "start" an Excel file because it is not executable.


    > How to start it as
    > perlscript.pl someexcel.xls



    You run this command line:

    perlscript.pl someexcel.xls


    If you instead meant that you want to run an external program, such
    as Excel, then you should have asked how to run an external program.

    The answer given in this FAQ:

    perldoc -q external

    outlines the three basic ways of running external commands.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 31, 2007
    #3
  4. max

    max Guest

    No! I want start perl script with XLS document as argument.
    Start in CMD with typing perl script.pl someexcel.xls is normaly work,
    I want star it with click on Excel document, How to do it in Windows OS?


    > > How to start some file as Perl script argument?

    >
    >
    > What does "start some file" mean when you say it?
    >
    > You cannot "start" an Excel file because it is not executable.
    >
    >
    > > How to start it as
    > > perlscript.pl someexcel.xls

    >
    >
    > You run this command line:
    >
    > perlscript.pl someexcel.xls
    >
    >
    > If you instead meant that you want to run an external program, such
    > as Excel, then you should have asked how to run an external program.
    >
    > The answer given in this FAQ:
    >
    > perldoc -q external
    >
    > outlines the three basic ways of running external commands.
    >
    >
    > --
    > Tad McClellan SGML consulting
    > Perl programming
    > Fort Worth, Texas
     
    max, Jan 31, 2007
    #4
  5. I've corrected your top-posting. Please don't top-post, write your below
    BELOW the text you are replying to and trim any non-relevant material
    from the quotation. If you don't do this you'll annoy many of the people
    you want to get help from.

    max wrote:
    >>> How to start some file as Perl script argument?
    >>> How to start it as
    >>> perlscript.pl someexcel.xls

    >>
    >> You run this command line:
    >>
    >> perlscript.pl someexcel.xls
    >>

    > No! I want start perl script with XLS document as argument.
    > Start in CMD with typing perl script.pl someexcel.xls is normaly work,
    > I want star it with click on Excel document, How to do it in Windows OS?


    In windows you do it by making a file association. This question would
    have been best asked in a Windows newsgroup or forum.

    See <http://support.microsoft.com/kb/307859>
     
    RedGrittyBrick, Jan 31, 2007
    #5
  6. max

    John Bokma Guest

    John Bokma, Feb 1, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,829
  2. Lee NL
    Replies:
    9
    Views:
    174
    Richard Conroy
    Aug 9, 2007
  3. Grischa Schuering
    Replies:
    1
    Views:
    537
    David Efflandt
    Sep 30, 2003
  4. Bill H
    Replies:
    3
    Views:
    150
    Bill H
    Sep 18, 2007
  5. Replies:
    4
    Views:
    193
    Josef Moellers
    Oct 27, 2007
Loading...

Share This Page