Subject: Re: PERL problem....
From: Tim ODriscoll (tim@StokePogesWay.demon.co.uk)
Date: Sun Mar 10 2002 - 04:49:45 MST
On Sat, 9 Mar 2002, sfalken wrote:
>
> from the filename (get it under 31 characters). I've got the script doing
> that, but when I tel the script to mv $oldname $newname it's bitching
> because of the whitespace, is there anyway to strip all of the spaces out of
> the filenames before I start moving them about? or is there another way to
> manipulate the filename that I'm missing?
>
You'll probably need to put "s around the filenames, like this:
mv "$oldname" "$newname"
Perhaps you'll need to escape the "s out, too: mv \"$oldname\" etc..
Else you can go:
$oldname =~ s/\ //g;
I think that should work.
HTH,
Tim
This archive was generated by hypermail 2a24 : Sun Mar 10 2002 - 05:05:58 MST