For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > March 2005 > new line "\n" for print file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author new line "\n" for print file
Brian Volk

2005-03-31, 3:56 pm

Hello,

Can someone explain how I can add "\n" to this line of code.... If that is
really my problem.. :~)

copy ($print_file, '//hp-exch/HP4100-IS');

The reason I ask is here's what I'm printing; (teminal veiw)

--begin

<left>
<p>Green Solutions Industrial Cleaner is a non-toxic, heavy-duty product,
formul
ated to tackle difficult cleaning tasks. Formulated with a super surfactant
clea
ning system, the concentrate is engineered to quickly remove petroleum-based
soi
ls with efficiency. Surfactants with superior wetting action perform the
cleanin
g and degreasing for Green Solutions Industrial Cleaner. The super
surfactant bl
end provides quick penetration and initial removal of everyday petroleum
based s
oils such as motor oil, hydraulic fluid, lithium grease, lubricant oils and
stam
ping oils, etc. pH 9.0 - 10.0.</p>
</left>

--end

and this is what is the printer shows

--begin

<left>
<p>Green Solutions Industrial Cleaner is a non-toxic, heavy-duty product,
formul
</left>

Here is the whole program...

--begin

#!/usr/local/bin/perl

use strict;
use warnings;
use File::Copy;

my $print_file = "C:/brian/test/12345.html";
open (PRINT, "< $print_file") or die "can't open $print_file : $!";

while( <PRINT> ) {
print;
}

copy ($print_file, '//hp-exch/HP4100-IS');

close PRINT;

--end

Thank you!!!

Brian Volk
HP Products
317.298.9950 x1245
<mailto:bvolk@hpproducts.com> bvolk@hpproducts.com



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com