[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
Re: [MacPerl-AnyPerl] Perl on WinNT
Thanks Chris for your reply.
À (At) 22:09 -0400 08/08/99, Chris Nandor écrivait (wrote) :
>Read perlport, it should explain it (it comes with 5.004_05 and higher, and
>is on my site and CPAN). Basically, when reading a text file on Windows, a
>CRLF will be converted into an LF, and chomp() will remove the trailing LF.
>If you use binmode() on the filehandle, however, the CRLF will not be
>converted, and the LF will still be removed, leaving the CR.
Thanks, great info. I downloaded perlport from your site.
> >check($n);
>>
>>sub check() {
>
>What is the () doing there? That means you cannot pass any data into the
>subroutine, it is an empty prototype. Right off you are headed for
>trouble. In this case, the empty prototype is not seen until after the
>subroutine is first called, so you should be "OK", but it is still Bad.
>Don't use prototypes at all unless you really understand what you are
>doing. I've almost stopped using them altogether.
Hu! This an error from my part. Its a Frontier's atavism. I didn't
want to do a prototype. Its just that I don't do so often Perl, and I
get mix up with other scripting languages.
>I am not sure what is going on. You shouldn't have a problem like that.
>Are you positive there is a newline there, and the text isn't just wrapping
>to the next line? Just throwing out a wild guess. :)
Ok, I found the bug now. In a prior routine, I was writing to the
file the information. But I didn't pay enough attention. So instead
of using "\n", I was using "\r".
print F "PAGE\tDESTINATAIRE\tEXPEDITEUR\tDATE\tVU\r"
Cheers
-Emmanuel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Emmanuel M. Décarie - <emm@cam.org>
---> The Frontier Newbie Toolbox:
<http://www.cam.org/~emm/frontierNewbieToolbox.html>
==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org