in reply to @ARGV ignores quotes
... if there is quotes inside the job part, it will remove those quotes.
Command line arguments are processed first by the command line
interpreter (CLI) of the OS you're using, the "shell', e.g.,
sh, bash, etc. (I'm assuming you're running
under *nix).
It is the OS CLI that's
"removing" quotes before Perl ever sees the command line arguments.
E.g., your command line might have been
my_script.pl '--option1' '--option2' '--job' 'some_job.pl' '-option1' 'some_job2.pl -x abc' '-option2'
and the @ARGV dump from within Perl would have been exactly
the same.
(Update: For example, here's something from Windoze — I
don't have access to *nix ATM:
This even has escaped double-quotes embedded in one of the arguments. As you
can see, the strings derived from the command line arguments are
exactly the same within Perl.)
Why do you need to know if a command line argument was originally quoted or not? (Update: IOW, why not just assume that all the command line options were quoted. What difference would it make?) This sounds very much like an XY problem.
I want to get user's command and execute it at some point. It could have parameters and I don't want the user to insert it into file first.
I don't understand what you are trying to do here and what problem you're trying to overcome.
Give a man a fish: <%-{-{-{-<
|
|---|