Posted by ljmacphee on March 12, 2007 under how to, perl |
Here is an example of a HTML form that takes numbers and information from a user, manipulates them using a CGI PERL script and calculates an answer, this one does lucky numbers, you can adjust it to any calculation you choose.
Lucky Numbers html page in txt format
Download Lucky Numbers Perl Script
Posted by ljmacphee on March 8, 2007 under linux, osx, perl, tools |
This is a tool that enters a sub-directory and reads and changes one string to another.
I use it when I make major updates to my website or am updating links. I can have it search for the old link and replace it with the new link. (or any other piece of text you’d like to change).
It puts the altered files in the working directory and leaves the originals unchanged. It also prints to the screen the file name and line number of any changes made.
findAndReplace.pl
Posted by ljmacphee on March 7, 2007 under how to, linux, osx, perl, tools |
If you have a directory of files with the same substring sayjoke1.html, joke2.html, joke3.html … and you want to rename themriddle1.html, riddle2.html, riddle3.html this tool does that.
It is a PERL script, it will ask you for the old and new strings and changethe files in the directory in which the script is located.
chgfilename.pl
Posted by ljmacphee on March 6, 2007 under how to, linux, osx, perl, tools |
I have two older scripts for grabbing your ip and emailing it to you. Getip.pl and Getip2.pl And today I put together Getip3.pl.
The first script is the bare minimum needed and works on Linux. Just change it to put in your email address and run it as a cron job.
The second script works on Windows or Linux and is more robust than the first one. Again change the email information and then run it as a cron script under Linux or in the Windows scheduler if you are running Windows.
The third script works on OSX. Change the email to and from addresses. Install it as a cron job to have it run automatically on your computer. (MacDevCenter Cron job how to is at bottom of the page )