#!/usr/bin/perl # # Strips indented code back to a form that can be uploaded # # Strips out command lines - those starting with @@ or ". # Removes leading spaces and cats everything else together. Assumes # blank lines are delimiters between things. # # Copyright (C) Bek Oberin, 1997. # http://www.tertius.net.au/~gossamer/mush/ # # Last updated by gossamer on Wed Dec 24 10:52:48 EST 1997 # $line=''; while (<>) { if (/^\s*$/ && $line) { print "$line\n"; $line=''; } elsif (/^#/) { # ignore this line } elsif (/^"/) { # ignore this line } elsif (/^\s*\@\@/) { # ignore this line } else { s/^\s*//; # strip leading spaces chomp; # strip \n $line .= $_; } } print $line if $line;