Writing string to a .txt file (scripting in Perl)
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Writing string to a .txt file (scripting in Perl)

  1. #1
    Join Date
    Jul 2010
    Posts
    1

    Writing string to a .txt file (scripting in Perl)

    I want to have my server-side Perl script grab a string that is sent by a client-script (written in Javascript), then save that string into a .txt file, but for some reason, it's not working. I am using AJAX to get the web browser (firefox) to display what the server-side script will display after running (which it does successfully), but I just can't save the string passed in by client-side script using the AJAX .send("string") method.

    I was wondering if there is something else (like a special library / software , etc) that I need in my Apache HTTP server to it to write string to .txt file when the code is run on browser.

    I am trying to run the code on Apache HTTP server, and the OS I am running the code is Fedora 13. I am running the code on:
    http://localhost:56789/ajax2.html

    (Please see code attached if it will help)
    ajax.cgi.txt is the .txt version of the server-side function written in Perl, ran as a cgi program
    ajax2.txt is the .txt version of the html page, which runs the Javascript (client-side)
    ajax2.js.txt is the .txt version of the client-side script, using AJAX...

    Thanks for your help! Any advice is appreciated!
    Attached Files Attached Files

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,840

    Re: Writing string to a .txt file (scripting in Perl)

    There's nothing wrong with the PERL code. First off, I would check and make sure that the path is correct. Remove all folders and just write to a text file on the root. See where it goes.

    After that I would check for a rights issue.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center