join \n?

Robert L. Harris Robert.L.Harris at rdlg.net
Tue Oct 23 15:12:45 CDT 2001



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