Home: Perl Programming Help: Beginner:
Logging to stdout with EXPECT. Can I alter the newline?



Calab
Novice


Jun 26, 2012, 10:12 PM


Views: 1846
Logging to stdout with EXPECT. Can I alter the newline?

I'm "repairing" some perl code that was written by someone else and trying to clean it up as I go along...

I've had a request to make the output of the script more "DOS" friendly by altering the newline character used on the output to something that will work in DOS.

My problem is that the output is generated by turning on stdout logging in EXPECT. I don't see any way to alter the newline character that is used when writing to stdout.

Can the newline character going to stdout from EXPECT be changed?


wickedxter
User

Jun 28, 2012, 3:13 PM


Views: 1550
Re: [Calab] Logging to stdout with EXPECT. Can I alter the newline?

look in to this special variable $\


Calab
Novice


Jul 9, 2012, 4:19 AM


Views: 1351
Re: [wickedxter] Logging to stdout with EXPECT. Can I alter the newline?

I figured out where I was making my mistake... I misunderstood the way that EXPECT works.

I was able to alter the output of the command run by EXPECT so that the EOL was what we needed.