Guy P wrote:

> The problem still remains. 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 when the backslash is
> followed by a "u", it transform in uppercase the next letter as it would
> do a break page if it was followed by a "n".
> 
> The value given to the $reprt in the program below is fetched from a
> database query and appears to be stored exactly like this in the table
> 
> ##########################################################
> #!/usr/bin/perl
> my ($reprt);
> $reprt= "\Directions\unit\progr\sourcsql";
> 
> print $reprt."\n";
> 
> # $reprt =~ s/\\/\\\\/g;
> $reprt =~ s/[\\]/\./g;
> 
> print $reprt."\n";
> 
> ##########################################################

your reg. exp is fine except that you put $reprt in double quote. try:

#!/usr/bin/perl -w
use strict;

my $s = '\Directions\unit\progr\sourcsql\new';

print "$s\n";
$s =~ s#\\#\.#g;
print "$s\n";

__END__

prints:

\Directions\unit\progr\sourcsql\n
.Directions.unit.progr.sourcsql.n

when you get your string back from db, do not quote it like you did.

david

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to