Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: create directory with input

by AnomalousMonk (Archbishop)
on Dec 03, 2017 at 17:35 UTC ( [id://1204812]=note: print w/replies, xml ) Need Help??


in reply to create directory with input

To the specific root-cause solutions offered by others, I would add that enabling warnings along with its good friend strict will let Perl at least give you some hints about problems like this:

c:\@Work\Perl\monks>perl -le "use warnings; use strict; ;; my $directory_name = 'foobar'; my $dir = \"C:\Users\darkblack\Desktop\A\.$directory_name\"; print qq{'$dir'}; " Unrecognized escape \d passed through at -e line 1. Unrecognized escape \D passed through at -e line 1. Unrecognized escape \A passed through at -e line 1. 'C:SERSDARKBLACKDESKTOPA.FOOBAR'
Also, see Quote and Quote-like Operators in perlop for double-quotish escapology info.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

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

    No recent polls found