<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Text File" newcontext="true">
<p>
#!/usr/bin/perl -w
</p>
<p>use Date::Manip;
</p>
<p>my $output = &quot;&quot;;
</p>
<p>my $inc = 0;
</p>
<p>$artnum .= scalar(&lt;&gt;);  # art num
$newsgroups = &lt;&gt;;
$path = &lt;&gt;;
$date = &lt;&gt;;
$subject = &lt;&gt;;
</p>
<p>$foo = $date;
chomp $foo;
$newdate = &amp;ParseDate($foo);
# print &quot;ND1: $newdate\n&quot;;
$newdate = &amp;UnixDate($newdate, &#x27;%a, %d %b %Y %T GMT&#x27;);
# print &quot;ND2: $newdate\n&quot;;
</p>
<p>@newsgroups = split(&#x27;,&#x27;, $newsgroups);
foreach $x (@newsgroups){
  $x = &quot;oldnews.&quot; . $x;
}
$newnewsgroups = join(&#x27;,&#x27;, @newsgroups);
</p>
<p>$output .= &quot;Newsgroups: $newnewsgroups&quot;;
if ($subject =~ /\S/) {
  $output .= &quot;Subject: $subject&quot;;
} else {
  $output .= &quot;Subject: none\n&quot;;
}
$output .= &quot;Date: $newdate\n&quot;;
$output .= &quot;From: oldnews-conversion\@complete.org\n&quot;;
$output .= &quot;Path: not-for-mail\n&quot;;
$foo = $artnum;
chomp $foo;
#$bar = $newsgroups;
#chomp $bar;
$output .= &quot;Message-ID: &lt;oldnews.conversion.$foo\@oldnews.complete.org&gt;\n&quot;;
$inc += 1;
$output .= &quot;\n&quot;;
$output .= $artnum;
$output .= $newsgroups;
$output .= $path;
$output .= $date;
$output .= $subject;
$output .= join(&#x27;&#x27;, &lt;&gt;);
</p>
<p>sendit();
</p>
<p>sub sendit {
  print &quot;#! rnews &quot; . length($output) . &quot;\n&quot;;
  print $output;
  $output = &#x27;&#x27;;
}
</p>
<p></p>
</card>
</wml>
