Re: Control Characters

2007-03-13 Thread Shawn Milo
On 3/13/07, Bill Jones <[EMAIL PROTECTED]> wrote: My tests all show that ^@ is not null but the \n you want. Control-J is two bytes: \0 \n Under C the \0\n is a End-Of-String indicator -- required to differentiate it from numbers, etc. HTH/Sx =) -- WC (Bill) Jones -- http://youve-reached-t

Control Characters

2007-03-13 Thread Shawn Milo
How can I get Perl to spit out control characters, such as ^J (the linefeed) as the actual control character? Every time I try to print it, Perl converts it to the ASCII \n character. I need to process a file, converting a \n to \cJ, AKA the ^J character. I've tried various things with sprintf,

Perl and Python, a practical side-by-side example.

2007-03-02 Thread Shawn Milo
I'm new to Python and fairly experienced in Perl, although that experience is limited to the things I use daily. I wrote the same script in both Perl and Python, and the output is identical. The run speed is similar (very fast) and the line count is similar. Now that they're both working, I was

Treating a split() as an array

2007-03-02 Thread Shawn Milo
Considering the following: @temp = split(/\t/, $row); $piid = $temp[0]; Is it possible to cut this down to one line, similar to the following Python code? piid = row.split('\t')[0] Thank you, Shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]