Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: File::NCopy Problem

by Aragorn (Curate)
on Aug 26, 2004 at 08:47 UTC ( #385936=note: print w/replies, xml ) Need Help??


in reply to File::NCopy Problem

It would help tremendously if you at least specify on which platform you're working. Also, I'd like solutions to all my problems too, but I'm afraid I'm not going to get them.

But, I'm in a good mood as it's the birthday of my mother-in-law, so I'll provide a workaround which works at least on Linux and Apple OSX. You can use spaces in file/directory names by escaping the space characters with a backslash.

#!/usr/local/bin/perl use strict; use warnings; use File::NCopy qw(copy); my $src = "Dir With Spaces"; my $dst = "Target_Dir"; # Escape whitespace characters $src =~ s/(\s)/\\$1/g; # Copy recursively copy \1, $src, $dst;

Arjen

Update:Fixed bug in regex

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://385936]
help
Chatterbox?
[Eily]: hu, don't tell the other French people I never tried it, I might get kicked out :P
choroba . o O ( The Czech at-sign is also edible )
[Eily]: the French @ is a mouthful I guess...
[Eily]: choroba Wikipedia gives me Zavináč which doesn't seem to translate to something edible?
[Eily]: (yes I'm very good at using question marks, thank you)
[Discipulus]: O_O frexit for you! even me i tried. it was in the arabic quarter in Granada; they offered as 'tapas' in bars. I eataly somewhere they eat ;=P Sardinia a Pulia iirc
[choroba]: Zavináč

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-11-21 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (297 votes). Check out past polls.

    Notices?