Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^4: How to pass a file to GetOpt

by Anonymous Monk
on Jul 11, 2012 at 00:27 UTC ( #980986=note: print w/replies, xml ) Need Help??

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

No such file or directory - [C:\Users\Mruppe2\workspace\Perl] at 5MinI line 11.

The actual file path is longer than that. The error_log is actually just a file, I don't believe that it has an extension.

perl -input C:\Users\Mruppe2\workspace\Perl 5 Essen +tial Training\MPMStats Project\error_log -output C:\temp\output9.csv

Replies are listed 'Best First'.
Re^5: How to pass a file to GetOpt
by kcott (Archbishop) on Jul 11, 2012 at 00:57 UTC

    You'll need to quote pathnames with embedded spaces:

    perl -input "C:\Users\Mruppe2\workspace\Perl 5 Essent +ial Training\MPMStats Project\error_log" -output C:\temp\output9.csv

    -- Ken

      OP: for reasons like this, I recommend not putting spaces in any filenames. It makes things much easier in the long run.
        Whereas I agree that it's better to avoid spaces, unfortunately we don't always have control over filenames. It may be ok to not care about spaces in quick and dirty test scripts, but we normally don't have that luxury in production environments for example. It's better when the code is prepared to handle unusual characters in the file names rather that assume that they will never happen.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2023-09-30 09:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found