Hi perl_haxor, On Thursday 28 October 2010 15:58:19 perl_haxor 123 wrote: > Hi All, > > I'm a beginner in perl and i try to read a file, but these files > contains characters like (^M ^G)......I wanted to know what are these > characters and how can remove them using perl?.....and also please let me > if there is any link form where i can find what these characters are and > their ascii values?......any sugges would be really helpful >
See: http://en.wikipedia.org/wiki/ASCII#ASCII_control_characters You can remove them using perl using a command such as s/[\cM\cG]//g; See \c in http://perldoc.perl.org/perlre.html . Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Original Riddles - http://www.shlomifish.org/puzzles/ <rindolf> She's a hot chick. But she smokes. <go|dfish> She can smoke as long as she's smokin'. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/