Log in

View Full Version : Escaping a Vertical Tab


YankeeFan
May 20, 2009, 06:18 AM
Greetings
I've found many sites that say \v is for a vertical tab. I found one that says it is not recognized as an escape character. I'm using perl v5.8.8 on a windows machine. In my script I cannot use \v, as it doesn't work. Sigh!

$foo =~ s/\v/' - '/g;

>> Unrecognized escape \v passed through at csodata-csv.pl line 668.

Is there any simple work around for this? One site says use s/\\v/' - '/g, but that doesn't work either.

Thanks for any tips.

YankeeFan
May 20, 2009, 06:55 AM
The answer is to use the Hex or Octal code for the ascii character.:

I choose the octal code for vertical tab: \013, Hex = B
$foo =~ s/\013/' - '/g;