I'm trying to copy data from one database field to another.  The problem is
that the field contains various newline and other types of control
characters.  Whenever the script runs, it processes those as perl code
instead of data like I'd like it to.  How can I prevent it from doing this?

 
Here is an example of what is happening.
 
    $variable = "Some data\nSome more data\n\nBlah Blah"
 
This variable was populated from an SQL table.  I'm trying to create a valid
SQL scripts file so I do the following.
 
    print FILE "INSERT into table (field) VALUES ('$variable');"
 
The file gets created just fine, but when I view the file it looks like
this:
   
    ----
    INSERT into table (field) VALUES ('Some Data
    Some more data
 
    Blah Blah
    ----
 
Basically, I'd like it to look exactly as it is stored in the
variable...which would be like this:
    
    ----
    INSERT into table (field) VALUES ('Some data\nSome more data\n\nBlah
Blah";
    ----
What do I need to do?
 
Thank you very much!!

==============================================================================
NOTICE - This communication may contain confidential and privileged 
information that is for the sole use of the intended recipient. Any viewing,
copying or distribution of, or reliance on this message by unintended
recipients is strictly prohibited. If you have received this message in
error, please notify us immediately by replying to the message and deleting
it from your computer.

==============================================================================

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

Reply via email to