From: Simon Cozens Date: 2002-10-30T20:37:20+09:00 Subject: Re: How do I get a '\'? "J.Hawkesworth" writes: > the memory stick but I can't find a way to get ruby to produce a single > '\' character (which I need for specifiying subdirectories). > > irb(main):041:0> p "\\" > "\\" You're being bitten by the fact that p uses inspect, and String.inspect gives you a "displayable" representation of a string that can be re-evalled back into ruby. "\\" does what you want: % ruby -e 'print "\\"' \ -- "If you want to travel around the world and be invited to speak at a lot of different places, just write a Unix operating system." (By Linus Torvalds)