#!/usr/bin/perl

$input_file = $ARGV[0];

$quote_begin = "BEGIN_QUOTE";
$quote_end = "END_QUOTE";

open(FILE, "< $input_file");
@lines = <FILE>;
close(FILE);

foreach $line (@lines) {
   if ($line =~ $quote_begin) {
      $line = "<BLOCKQUOTE><I>";
   } elsif ($line =~ $quote_end) {
      $line = "</I></BLOCKQUOTE>";
   } elsif ($line =~ '^\n') {
      $line = "<BR><BR>";
   }
   chomp($line);
   print $line . "\n";
}

