join \n?
Robert L. Harris
Robert.L.Harris at rdlg.net
Tue Oct 23 15:28:40 CDT 2001
duh... ok, banging my head on my desk now.
Thus spake Adrian Kalaveshi (akalaveshi at mahinetworks.com):
> 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);'
: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