#!/usr/bin/perl while() { $_ =~ s/\/>/g; $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^).])/\$1\<\/a\>/g; $_ =~ s/^$/\ /g; # empty lines are nbsp $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line print $_; }