I work as student programmer for my college. Recently my college redesigned their entire website. The wanted to keep an archived copy of the old website. The webmaster asked me to write a Perl script that would be run on the webserver, search every file, and replace any absolute links with archive URL. I wrote the script on my computer (with Perl 5.8.4 installed at the time) and emailed it to him.
As normal with websites, they were running behind schedule. The administration said the new website had to be up on Monday. It was Sunday, and the webmaster was still working on it. He called me Sunday and said the script I wrote would not work. I knew it would be easier to take a look at it myself, so I walked down to meet him in his office.
He was telnetted into the old webserver, which happened to be a HP-UX server (ironic because of the first reply to this thread). They bought a new webserver for the new website, but it is not much better: Windows Server 2003 (at least it is running Apache rather than IIS though). I tried several things, and I could not get the script to work. Then I thought to type
perl -v and found out it was running Perl 4.
I've only been using Perl for about a year. I had never used Perl 4. Luckily you can find anything on the internet. I found complete documentation for Perl 4
here. I read up on it and rewrote the script for him in about two hours.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.