in reply to Convert a string in his pattern equivalence

Refer Quotemeta
  • Comment on Re: Convert a string in his pattern equivalence

Replies are listed 'Best First'.
Re^2: Convert a string in his pattern equivalence
by ccdoub (Initiate) on Sep 20, 2010 at 02:49 UTC

    Thanks, that was the function: "quotemeta".

    And in a example,

    $old = "(hola[amigo])"; $new = quotemeta($old); print "$old turns to $new";

    Prints,

    (hola[amigo]) turns to \(hola\[amigo\]\)
      Yes, you had already said it, I kind of just follow the link :P Thx again.