How to start some file as Perl script argument?

M

max

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
 
J

Josef Moellers

max said:
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.
 
T

Tad McClellan

max said:
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.
 
M

max

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?
 
R

RedGrittyBrick

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.
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,661
Latest member
sxarexu

Latest Threads

Top