#!/usr/bin/perl5 $LISTAR_HOME = "/home/listar"; $LISTS = "$LISTAR_HOME/data/lists"; $LISTAR = "$LISTAR_HOME/listar"; $LISTAR_OWNER = "listar-owner"; open(LISTS, "<$LISTS") || die "Couldn't open $LISTS: $!\n"; print << "EOF"; # !!! Do not edit this file !!! # This file was created automatically. # Edit $LISTS instead, and re-run # $0 listar: "|$LISTAR" EOF while () { chop; s/\s*#.*//o; # Strip comments and trailing whitespace next if /^$/o; # Skip empty strings ($list, $owner) = split ':'; $list =~ s/^\s*(.*\S)\s*$/$1/; $owner =~ s/^\s*(.*)$/$1/; $owner = $LISTAR_OWNER if $owner eq ''; print << "EOF"; $list: "|$LISTAR -s $list" $list-request: "|$LISTAR -r $list" $list-repost: "|$LISTAR -a $list" $list-admins: "|$LISTAR -admins $list" $list-moderators: "|$LISTAR -moderators $list" $list-bounce: "|$LISTAR -bounce $list" $list-owner: $owner EOF } close LISTS;