Hi - > -----Original Message----- > From: Guy P [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 9:10 AM > To: [EMAIL PROTECTED] > Subject: Backslash in a string > > > Hello, > My Perl program execute a query that bring back into a variable a Windows > paths initially stored in a database. I have got problems to manage the > backslash. > > Example: > > Here's what is stored in the database --> > \Directions\unit\progr\sourcsql > I would like to get it in a variable thus I could use the Perl print > function and have the same printed on the screen. > > Thank you! >
Escape the esacpe character; if $var holds your path, do: $var =~ s/\\/\\\\/g; This replaces \ with \\ which will then print as \. Pretty messy, yeah? Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]