This isn't a Perl problem, it has to do with how your shell is
processing the command-line parameters.

Put double-quotes around the directory name and you won't have a
problem.



-----Original Message-----
From: Nishi Bhonsle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 11:44 AM
To: beginners perl
Subject: How to ignore spaces in directory names?

Hi:

In writing a perl script to read the contents of a directory on a
windows
system, i noticed that there are some directory names have spaces in
them.
How can I modify the line below so it would ignore the spaces in the
directory name and still process it ?

opendir DIR, $path or die "Can't open $path: $!";

P.S In the above line, $path is the directory path passed to the program
as
a command line argument.

Thanks much.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to