[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Is this a bug? Thanks for the help



At 4:08 pm +0100 23.02.97, Robert Pyle wrote:

	[ ... 'here'-document woes snipped ... ]

>Many thanks for the help.  I thought I should point out that "helpful"
>editors (and Alpha is certainly that) may introduce characters without
>benefit of keystrokes by the author.  Beware.

It's also worth mentioning that file-transfer tools can do the same thing,
particularly if they do line-end conversions. (This isn't specifically
MacPerl-related, but I thought I'd mention it anyway, as it could just bite
someone at some point further down the line). I spent quite a lot of time
helping someone debug a script which turned out to have been broken by the
act of transferring it from UNIX to DOS and then from DOS back to UNIX. The
end result was stray carriage-return characters before (or perhaps after)
the closing token of the 'here'-document, making it unrecognisable to Perl.
'foo' is not the same thing as 'foo<CR>'. Beware.

                                             A


--
angus@pobox.com                             http://pobox.com/~angus

"But I'm weak - I don't question a word.         "Knights on Malta"
 It's hard to speak your mind                        Blyth Power
 When you've nothing much better to say
 Than 'If I'm meek - will I inherit the earth?'"