in reply to Updates problem with single quote
Any sort of whitespace at the edges of the string value (or anywhere within it) will be obvious that way, as well as any quotes or other stuff. The occurrence of an empty string comes across pretty clearly as well.p "==$string_variable=="
For that matter, you could improve your error message from the "die" call, to make it more likely for the real problem to be visible:
If you know that the parens should contain only a valid path string and nothing else, then putting the string into error message will make it possible to see whether the variable really contains what you intended (without having to use the perl debugger).chdir($cmd) or die "chdir($cmd) failed: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Updates problem with single quote
by Sun751 (Beadle) on Jul 24, 2009 at 05:36 UTC |