Eugene Kosov schreef:
> Oleg V. Volkov:
>> Ron Wingfield:

>>> while (defined($line = <INFILEHANDLE>)) {
>>>        $line =~ s/\r//g;
>>>        printf OUTFILEHANDLE ("%s"),  $line;
>>> }
>>
>> Why not this one?
>> $line =~ s/\r$//;
>>
>> I didn't see anything about removing ^M anywhere in original
>> post, only at end of line.
>
> Why not just:
>
> while(<INFILEHANDLE>)
> {
>     s/\r$//;
>     print OUTFILEHANDLE;
> }
>
> ??

There are just 10 schools, the one that likes topicalization and the one
that prefers explicit variables. Both schools prefer "use warnings; use
strict;" above just "-w" of course.

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to