> -----Original Message-----
> From: Konstantin Berman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 4:25 AM
> To: '[EMAIL PROTECTED]'
> Subject: change \ to /
> 
> 
> Hi.
> All I want is to change \ to / .
> The \ is in the variable $line, so I run the command:
> $line=~s/\\/\//;
> But it doesn't change anything. Can anyone please help?

Hmm, then the \ must not be in $line. Try this simple program:

$line = 'Foo\Bar';
$line =~ s/\\/\//;
print "$line\n";

If it doesn't print "Foo/Bar", you need a new computer :)

P.S. you can reduce the "stack of toothpicks" appearance of your regex
somewhat by using a different delimiter, e.g.:

   $line =~ s!\\!/!;

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

Reply via email to