Which produces things like:#!/usr/bin/perl # url.pl -- Windows .url to html table converter. use strict; use warnings; use File::Glob ':glob'; expand(); print "<ul>\n"; foreach (@ARGV) { filter($_); } print "</ul>\n"; sub filter { my $file = shift; open FILE, $file or die "Couldn't open: $file $!\n";; while(<FILE>) { if (/BASEURL=/) { s/BASEURL=//; print "<li><a href=\"$_\">$_</a></li>\n"; last; } } close(FILE); } sub expand { my @list; foreach (@ARGV) { foreach(bsd_glob($_)) { push @list,$_; } } @ARGV = @list; }
–hsm
"Never try to teach a pig to sing…it wastes your time and it annoys the pig."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pesky little URL files to HTML
by chromatic (Archbishop) on Dec 17, 2001 at 05:02 UTC | |
by hsmyers (Canon) on Dec 17, 2001 at 06:54 UTC | |
by chromatic (Archbishop) on Dec 17, 2001 at 07:33 UTC | |
|
Re: Pesky little URL files to HTML
by drewbie (Chaplain) on Dec 17, 2001 at 03:49 UTC | |
|
Re: Pesky little URL files to HTML
by Amoe (Friar) on Dec 23, 2001 at 16:03 UTC | |
|
(jeffa) Re: Pesky little URL files to HTML
by jeffa (Bishop) on Jan 07, 2002 at 22:49 UTC |