Perl Expect send array

R

ruud

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 ?
 
A

Anno Siegel

ruud said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,786
Messages
2,569,625
Members
45,320
Latest member
icelord

Latest Threads

Top