in reply to Re: replace / with \ using regular expressions?
in thread replace / with \ using regular expressions?

I have string say C:/this/is/atest/ i need to replace this with C:\this\is\atest\?
  • Comment on Re^2: replace / with \ using regular expressions?

Replies are listed 'Best First'.
Re^3: replace / with \ using regular expressions?
by Anonymous Monk on Jun 20, 2009 at 07:56 UTC
    What the problem is?
    $command = 'C:/this/is/atest/'; $command =~ s!/!\\!g; # Swap '/' for '\' die $command; __END__ C:\this\is\atest\ at - line 3.
      thanks i got it.