Revision 3 (by ahitrov@rambler.ru, 2010/03/24 15:19:32) The CORE
#!/usr/bin/perl

#############################################
# convert old rewrite patterns ( like @FOO@ )
# to mtt-compatible syntax
# (keeping @@BAR@@ samples)
#############################################

use strict;
use warnings 'all';


while (<>) {
	s/(?<!\@)\@([^\s\@]+?)\@/<% \$$1 %>/g;
	print;
}