Re: Perl Expect send array

From: Anno Siegel (anno4000_at_lublin.zrz.tu-berlin.de)
Date: 02/22/05


Date: 22 Feb 2005 09:39:30 GMT

ruud <geen@mail.invalid> wrote in comp.lang.perl.misc:
> I am having a logfile called "log".
> I am reading the whole logfile into an array:
>
> open (FPTR,"/home/ruud/log");
> @logfile = <FPTR>;
>
> When i do print "@logfile"; i get the correct output.
> But when i want to send the log to an (internal) newsgroup like this:
>
> $exp->send ("@logfile");
> It adds between every line an enter (\n)
>
> Is there a way to work around that ?

perldoc -f chomp

Anno



Relevant Pages

  • Perl Expect send array
    ... I am having a logfile called "log". ... I am reading the whole logfile into an array: ... i get the correct output. ...
    (comp.lang.perl.misc)
  • Re: Really Stuck, Please Help
    ... I am not sure how to construct an array. ... Reading Master Log", of the "Copreco Master Log" workbook. ... Dim sourceBook As String ...
    (microsoft.public.excel.programming)
  • Re: Problem with a script
    ... a loop there becomes impractical. ... You still have them as uniquely named array indexes... ... writing the code twice will only ... reading your entire code and parsing it in their head, ...
    (comp.lang.php)
  • Re: Problem with a script
    ... Okay, so variables have unique labels, that doesn't mean they still couldn't be handled in a loop. ... You still have them as uniquely named array indexes... ... I believe that for the new guy this code would be readable, and identifying problems should really not be any more difficult with this, plus I think that it actually might save some time to write the actual code from the beginnig, even though it's not at it's final stage, instead of first writing everything spread out, and then rewriting the same code again cleaned. ... If you expect a person to spend an hour reading your entire code and parsing it in their head, you wont get any help and have to solve the problem by yourself. ...
    (comp.lang.php)
  • Re: Reading Files Byte-For-Byte
    ... >> attempting to read the file into an array. ... to be slower due simply to the additional commands required to accomplish ... I think the misunderstanding came about due to your mentioning reading the ... of printable characters, you'll need to do something else if your file data falls ...
    (microsoft.public.vb.general.discussion)