#!/usr/bin/env perl sub help { print <>".(defined($ARGV[1]) ? $ARGV[1] : "../Licenses.hs")); print OUTFILE $ARGV[0]." = unlines\n ["; $first = ; # print first line seperately since $first =~ s/"/\Q\"\E/g; # it shouldn't be prefixed with a comma chomp($first); print OUTFILE " \"".$first."\"\n "; while() { chomp; $_ =~ s/"/\Q\"\E/g; print OUTFILE ", \"".$_."\"\n "; } print OUTFILE "]\n\n"; close(LICENSE); close(OUTFILE);