Guy P wrote:
> Look at the small program below.
> The result is this: DirectionsNitprogrsourcsql
> DirectionsNitprogrsourcsql
>
> And I would like it to be this:\Directions\unit\progr\sourcsql
...
>
> $reprt= "\Directions\unit\progr\sourcsql";
...Hi Guy
> ##
> #!/usr/bin/perl
> my ($reprt);
> $reprt= "\Directions\unit\progr\sourcsql";
>
> print $reprt."\n";
>
> # $reprt =~ s/\\//g;
> $reprt =~ s/[\\]/\./g;
>
> print $reprt."\n";
my $reprt= '\Directions\unit\progr\sourcsql';
print $rep
Look at the small program below.
The result is this: DirectionsNitprogrsourcsql
DirectionsNitprogrsourcsql
And I would like it to be this:\Directions\unit\progr\sourcsql
.Directions.unit.progr.sourcsql
Notice that it doesn't print the backslashes and it
Uh.. What's the problem?
Are you getting an error of some kind?
Are you having problems querying a database?
A little context/code you're using might help.
There is no conflict with having slashes in a string that is stored in a variable so
You may want to expound a little more.
DMuey
> Hello,
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