Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^8: How to pass a file to GetOpt

by Sinistral (Monsignor)
on Jul 11, 2012 at 16:32 UTC ( [id://981189]=note: print w/replies, xml ) Need Help??


in reply to Re^7: How to pass a file to GetOpt
in thread How to pass a file to GetOpt

You are correct that code should handle the case of, for instance, file names with spaces. However, in the example given, where the Perl interpreter is being invoked on the Windows cmd.exe command line along with a script name and command line parameters, it is cmd.exe that is handling the command line arguments and passing them to Perl. No amount of defensive programming in one's script would prevent a file name with space that does not have double quotes around it from being interpreted as two different elements of what becomes @ARGV.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-24 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found