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

Re: 'Permission Denied' error from File::Find

by Roger (Parson)
on Feb 11, 2004 at 03:36 UTC ( [id://328129]=note: print w/replies, xml ) Need Help??


in reply to 'Permission Denied' error from File::Find

$directory = 'c:\my_directory';

Should be:
$directory = 'c:\\my_directory'; # or $directory = 'c:/my_directory';

Update: This is not the problem it seems. So the problem should be elsewhere.

Replies are listed 'Best First'.
Re: Re: 'Permission Denied' error from File::Find
by jdporter (Paladin) on Feb 11, 2004 at 03:49 UTC
    Are you sure? It seemed to work for me:
    C:\>perl my $x = 'c:\my_dir'; print "'$x'\n"; ^Z 'c:\my_dir' C:\>perl -v This is perl, v5.8.0 built for MSWin32-x86-multi-thread

    jdporter
    The 6th Rule of Perl Club is -- There is no Rule #6.

Re: Re: 'Permission Denied' error from File::Find
by arden (Curate) on Feb 11, 2004 at 05:53 UTC
    Roger, that should work fine because witandhumor is using apostrophes (single ticks). These are all the same thing on Win32:

    $directory = 'c:\my_directory'; $directory = 'c:/my_directory'; $directory = "c:\\my_directory"; $directory = "c:/my_directory";

    Basically, if you're going to need to expand any variables, you need to use quotes (double ticks), but for literals it's easier to use apostrophes.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found