join \n?
Adrian Kalaveshi
akalaveshi at mahinetworks.com
Tue Oct 23 15:18:35 CDT 2001
I think you want "\n".
-adrian-
-----Original Message-----
From: Robert L. Harris [mailto:Robert.L.Harris at rdlg.net]
Sent: Tuesday, October 23, 2001 1:13 PM
To: Pikes-Peak Perl Mongers
Subject: join \n?
I'm running a script that does something like this:
open(CMDHandle, "ssh host1 cat /tmp/file |");
while(<CMDHandle>) {
chomp;
push(@Report, $_);
}
$Report=join('\n', at Report);
system("echo $Report | mail user at host");
A bit ugly but does what I need real well. The problem I'm having is the
join. When the email gets to my client it has "\n" embeded instead of
standard newlines.
Should I just use ^M instead or what?
:wq!
---------------------------------------------------------------------------
Robert L. Harris | Micros~1 :
Senior System Engineer | For when quality, reliability
at RnD Consulting | and security just aren't
\_ that important!
DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
More information about the Pikes-peak-pm
mailing list