Certainly nowhere near the best around, but a converter I obfuscated after writing for a friend.
#!/usr/bin/perl use strict;no strict 'refs';use Getopt::Long;use subs qw/nil/; use vars qw/$__ @cards %opts %fields @fields $count %fieldXform/;$|++; srand 500;$__=rand;$__.=rand;$__=~s/0\.//g;%fieldXform = eval do{undef$/; <DATA>};*{$_="nil"}=sub{ %opts = (quiet => 0);GetOptions(\%opts,'quiet!'); $count=0;*nil=sub{};$/='';};eval; while (<>) { my %card; eval((qw[nil last next last])[(/^Copyright/?1:0)+(/^Card/?0:2)]); pos=(s/^(Card \#)([^:])/$1:$2/mg*0); while (m[\G^([A-Z][A-Za-z\ \#&/]+):[\ \t]+(.*?)\n (?=$|[A-Z][A-Za-z\ \#&/]+:)]xgsm) { my ($k,$v) = ($1,$2);{my $k =~ tr/A-Z/a-z/;#; $k =~ s/Card/num/g; $v =~ tr/a-z/a-z/c; ;$k =~ s/\#/num/g; $k =~ tr/A-Za-z/_/c; $k =~ s/_+/_/g;$k =~ s/^\s*//; $k =~ s/\s*$//; } $k = (exists $fieldXform{$k} ? $fieldXform{$k} : $k); $v =~ s/^\s*//; $v =~ s/\s*$//; $v =~ s/\s+/ /g; (($k eq 'Pow/Tou')?{my ($tou,$pow) = split /\//,$v; if ($v =~ m!^n/a$!i) {my$i=0;$_.=($i++?substr($v,1,2):substr($v,0,2)) for ($tou,$po +w);} @card{reverse qw{Tou Pow}} = reverse($pow,$tou); $fields{$_}=$k for(reverse qw(Tou Pow)); }:{$card{$fields{$_[0]}=$_[0]}=pop@_; })->($k,$v); } %card or next; push @cards,\%card; $count++; ($count%10) || (print STDERR "\r$count") unless $opts{quiet}; } @fields = keys %fields; ($\,$/)=split//,' |'; print join '|',map{index($_,'|')<0 or die$_;$_} @fields;{; } for my $card (@cards) { print join '|',map{defined($_) ? do{index($_,'|')<0 or die$_;$_} : + ''} @{$card}{@fields}; }print STDERR "" unless $opts{quiet};exit unless $opts{quiet}; __DATA__ ('Pow/Tgh' => 'Pow/Tou', 'Pow/Tough' => 'Pow/Tou', 'Pwr/Tgh' => 'Pow/Tou', 'Card Title' => 'Card Name', 'Color' => 'Card Color', 'Type' => 'Card Type', 'Cost' => 'Mana Cost', 'Casting Cost' => 'Mana Cost', 'Artrist' => 'Artist', 'Artists' => 'Artist', 'CardCard Type' => 'Card Type');

In reply to mtg2xsv-obfuscated by premchai21

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.