in reply to Re: problem with File::Cat
in thread problem with File::Cat

Don't get me wrong, the -l is very nice, but not when you cat files (especially not with binary files)!
I cannot think of a situation in which this kind of behavior can be useful!!

Anyway from the suggested docs the answer to my problems was simple
{ local $\ ; # do 'cat' stuff here }
Thanks a lot
LuCa

UPDATE: I checked the code from the cpan module File::Cat and I would suggest to change the following
while (<FILE>) { print $handle $_; }
into
while (<FILE>) { printf $handle $_; }
(not tested)

Replies are listed 'Best First'.
Re^3: problem with File::Cat
by jwkrahn (Abbot) on Apr 24, 2007 at 17:43 UTC
    You definitely do not want to use printf like that!   The second argument in your example is the format string so any % characters in it will be interpreted by printf.
      hmm, thats a very good point. Then
      { local $\ ; while (<FILE>) { print $handle $_; } }
      would probably be the best solution, or do I miss something (again) ?

      LuCa