"Quoth Sherm Pendley" <[EMAIL PROTECTED]> on 5/31/04 3:01 PM:
> On May 31, 2004, at 12:50 PM, Ian Ferguson wrote: > >> That seemed to fix it, but the escaped version still is not recognized. > > It's not supposed to be recognized. Escapes are necessary in a shell, > because it uses white space as a delimiter, so white space that isn't > to be treated as such needs to be escaped. > >> I guess that this is a good time to ask whether or not Perl requires >> me to >> quote paths containing spaces > > No, it doesn't. Is this a good time to ask what led you to believe it > might, or should? ;-) > I program AppleScript as well. In fact, this is what introduced me to Perl and Ruby. Since Perl can handle many of the things I need faster and more efficiently, I started digging into Perl to do things like sort arrays, etc. In AppleScript, If I have a script and I need to call on a shell script to run with specific parameters, I have to issue a "quoted form of ..." to make sure that the argumetn is quoted to prevent the shell from seeing various arguments as you noted. This is what led me to ask the question regarding quoting. I thank you for your explanation of how Perl handles things Sherm. :) >> For example, if I had assigned $dir = >> "/Users/my_username/Desktop/with spaces/" and then I was to rmdir( >> $dir ) >> would this cause a problem or should I quote the variable rmdir( >> "$dir" )? > > It's unnecessary, and some members of the Cranky Perl Police will > chastise you for it. (See <http://tinyurl.com/2l6wm>). It *is* slightly > inefficient - a temporary string is created, and then $dir is > interpolated into the temp string - but the CPP makes entirely too big > an issue of it. ** This does not apply to you Sherm ** I asked a question about quoting an argument prior to removing a directory to learn something about how the language handles things. I don't know if the rmdir method is recursive and/or forced in Perl.. Telling me to try and see is a BS answer to give. Of course I could create a directory and try, but what is the need for a community of "experts" if I can't ask a "simple" question? Also... Read perldoc this and that... Most people new to a language will have no clue what you are talking about. Keep this in mind for the future. Do you tell a person who can't drive standard ... "Hey it's a car. Just drive it!"? Of course not. If you don't have the time to provide a proper answer, or some code to help explain things, please don't waste your time replying. -- Ian Ferguson Toronto, Canada mailto:[EMAIL PROTECTED]
