#!/usr/pkg/bin/perl #+JMJ # template.pl - Perl script template (command line) # Copyright 201x David Meyer. All rights reserved. # template.pl is part of template # Identification #################################################### $PROGRAM = 'template' ; $VERSION = '0.0' ; $SRCFILE = 'template.pl' ; $COPYRIGHT = 'Copyright 201x David Meyer' ; $DESCRIPTION = 'Perl script template (command line)' ; $USAGE = "Usage: template [] [ ...]" ; $CONTACT = 'David Meyer ' ; $prevmo = $prevda = $prevyr = ""; open(BLINKS, "ls -lt `find /arpa/ns/p/papa/cave/green/ -name *.blink`|"); while () { chop $_; ($tpm, $hlc, $own, $grp, $siz, $mmo, $mda, $mty, $fn) = split(/\s+/, $_); if ($mty =~ /:/) { if ($mmo ne $prevmo || $mda ne $prevda) { if ($prevmo ne "") { print "\n"; } print "

$mmo $mda

\n
    \n"; } } else { if ($mmo ne $prevmo || $mda ne $prevda || $mty ne $prevyr) { if ($prevmo ne "") { print "
\n"; } print "

$mmo $mda, $mty

\n
    \n"; } } $prevmo = $mmo; $prevda = $mda; $prevyr = $mty; $fn =~ m:([^/]+)/[^/]*$:; $cat = $1; open(BLINK, "<$fn"); $title = ; $uri = ; close BLINK; chop($title, $uri); print "
  • $title [$cat]
  • \n"; } print "
\n";