Change your line to

    foreach my $group ( `ls -d1 "$source/0*/*"`)

In this instance the spaces in the path serve as a parameter separator to
the ls command. You must therefore delimit the parameter with additional
quotes.

Cheers,

Rob



----- Original Message -----
From: "Johnson, Shaunn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 5:45 PM
Subject: RE: names with spaces


> --i've tried that, but, this is the results from that:
>
> [snip]
>
> /i/Depression Management/Mailing/test/03
> /i/Depression Management/Mailing/test/04
> /i/Depression Management/Mailing/test/05
> /i/Depression Management/Mailing/test/06
> ls: /i/Depression: No such file or directory    *** this is breaking ***
> ls: Management/Mailing/Dec2002/0*/*: No such file or directory  ***this is
> breaking ***
>
> [/snip]
>
> -----Original Message-----
> From: Kipp, James [mailto:[EMAIL PROTECTED]]
>
>
> >
> > The problem is, the first step is to create a sub-directory
> > in a path that have spaces in the names.
> >
> > I thought I fixed it, but, it seems that the script
> > fails one way or the other (building the sub-directory
> > or the creation of the files).
> >
> > Can someone tell me why this is not working?
> >
> > [snip script]
> >
> > #!/usr/bin/perl -w
> > #use strict;
> > use diagnostics;
> >
> > # created on 10 Dec 02
> >
> >
> > ** errors here? **
> >
> > # where should the ISO images go?
> > my $dest='/i/"Depression Management"/Mailing/test_dir';
>
> try:
> my $dest= "/i/Depression Management/Mailing/test_dir";
>
> >
> > ** errors here, too? **
> >
> > # Where is data coming from?
> > my $source='/i/"Depression Management"/Mailing/Dec2002';
> and
> my $source= "/i/Depression Management/Mailing/Dec2002";
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to