Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Help with processing command line arguments

by diotalevi (Canon)
on Dec 15, 2002 at 18:52 UTC ( #220037=note: print w/replies, xml ) Need Help??

in reply to Help with processing command line arguments

It sounds like you are using something DOS, Windows 95, Windows 98 or Windows ME. You can't run scripts just by typing their name - you have to pass the script file name into perl first. This looks something like C:\SRC> perl add 1 2. I think you're typing something like C:\SRC> add 1 2 instead. Or at least that's what I get from your error message.

Replies are listed 'Best First'.
Re: Re: Help with processing command line arguments
by mt2k (Hermit) on Dec 15, 2002 at 23:55 UTC
    Depends. If you've got a file association set up with perl scripts (or more correctly put, an extension, such as '.pl'), then a call to perl is not necessary. But in his case, I believe you are correct in a way: I don't think he has a file association set up for the extension he uses for his scripts.

    eval reverse@{[lreP
    =>q{ tsuJ\{qq},' rehtonA'
    ,q{\}rekcaH },' tnirp']}[1+1+

      Oh but it is, it is! The problem is that the DOS/Windows versions I've listed don't have a command shell powerful enough associate file extensions with an interpreter. Remember - you're restricted to here.

      Fun Fun Fun in the Fluffy Chair

        You can use start to get file-associations from the command line, as in start 1 2 3. (However, this will launch perl in a sperate process and window.)

        Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://220037]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-10-06 16:44 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (26 votes). Check out past polls.