Is that different from what you observed? If so which version of Perl are you using?


Urrrggh... the problem seems to be coming up because I'm calling it as a rake task. Rake was converting the \r\n to actual carriage return +newline in the call to the shell.

ie:
perl -i.bak -ne 's/ date,/ varchar(8),/; s/
//g;print' sql

which shows:

0001600   s   e   s  \n       p   e   r   l       -   i   .   b   a   k
0001620       -   n   e       '   s   /       d   a   t   e   ,   /
0001640   v   a   r   c   h   a   r   (   8   )   ,   /   ;       s   /
0001660  \r  \n   /   /   g   ;   p   r   i   n   t   '       s   q   l

*however* I'm still not sure that justifies the behavior I'm seeing... but because it's software, I think I'm going go on the side of hating it.

Should getting the actual characters be treated differently from getting the \r\n representation of those characters?

d.

Reply via email to