Trina Espinoza wrote:
> 
> tr/\012\015//d;
> 
> So a while back ago, there was someone kind enough to pass me the
> above snippet of code, which removes returns and newlines from data
> attained by perl. It works great and I would like to find the
> conversion table that was used so I can obtain the numbers to rid
> my code of other annoying characters.
> 
> When I looked it up on the ascii conversion chart it said that the
> decimal equilvelent for  012 and 015 are   ^J ^j LF lf linefeed c-J
> c-j \n and  ^O ^o SI c-O c-o shift-in.
> 
> Can someone tell me what 012 and 015 represent if not \r and \n?
> Should I be looking at another type of conversion table?

According to ASCII, 015 is the carriage return character and 012 is the
line feed character.  The \r and \n escape sequences represent carriage
return and line feed within perl itself but \n may be represented
differently in files depending on the OS and file system.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to