--- [EMAIL PROTECTED] wrote:
> The following line of code causes 2-lines of output to the file:
> 
>         print LOG "qcfg_dt='$qcfg_dt'   \n";
> $qcfg_dt contains Monday, August 20, 2001 8:53:26 PM
> The second quote is written on the next line.  In the file the information 
> looks like this:
> 
>         qcfg_dt='Monday, August 20, 2001 8:53:26 PM
>                 '
> 
> How do I get the outout to look like:
>         qcfg_dt='Monday, August 20, 2001 8:53:26 PM'

It sounds like you have a newline at the end of $qcfg_dt.  Assuming that you haven't 
changed the
value of $/ (or that you set it back to "\n"):

    chomp $qcfg_dt;
    print LOG "qcfg_dt='$qcfg_dt'   \n";

If the newline is embedded in $qcfg_dt and you have whitespace after it, you can do 
this:

    $qcfg_dt =~ s/\n\s*$//;
    print LOG "qcfg_dt='$qcfg_dt'   \n";

The first option is probably what you want (and it's faster, too).

Cheers,
Curtis Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to