perlquestion
Chuma
<p>Dear monks,</p>
<p>I have an HTML file showing a table, and I'd like to be able to edit parts of it. Naturally, you can't edit the table directly in the browser, so I figure I'll click a table cell and have Javascript pop up an input box, then pass that data to a Perl script which updates the underlying data file and the HTML. I could do that using CGI, but that seems like a strange way of doing it – I'm not going to put this functionality online, so why involve a server when all I want to do is edit my own files? But of course you can't run a local Perl script from a webpage, since that would be a security problem. So I'm trying to figure out a way to make Perl react to what's going on in the webpage.</p>
<p>So far my best idea is:
<ul><li>have my Perl program running in the background</li>
<li>on clicking a table cell, ask for user input with Javascript</li>
<li>put that input plus a cell reference in an invisible text field</li>
<li>copy that text to clipboard</li>
<li>let the Perl script listen for changes to the clipboard, and use that to update the data files</li></ul></p>
<p>Can you think of a solution that's less ridiculous?</p>