Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
As I was working on getting DBD::CSV to work on my Windows98 maching with ActiveState Perl 5.6.0, I had some problems. $connectstr="C:\Windows\Desktop" didn't work. I got an error along the lines of "C:indowsesktop not found." (sorry, can't remember the actual error, but that's the gist of it. So then I put in an extra set of quotes $connectstr="C:\\Windows\\Desktop" and got the same error. So, after trying a few hundred different things, I got it to work with single quotes. I figured if it worked with single quotes, then putting more backslashes infront of the existing backslashes would work inside double quotes, which it did. Unfortunatly, I still don't know why it works.
I looked into CSV.pm. It uses prototypes, which I don't get yet, and I don't have my camel handy. sub connect ($$;$$$) means (I think) two scalars, followed by three optional scalars. &DBD::CSV::connect() doesn't have a regex in it, but it does call &DBD::File::dr::connect() which does use a regex (one that is *way* beyond me now), which is where the problem comes from. I think that makes it not a bug, but something strange that isn't documented in DBD::CSV as far as I can tell. What do you think? Does any of this make sense?
michael In reply to Re: (tye)Re: I think I'm starting to get it
by coolmichael
|
|