#! /usr/bin/perl -w use strict; use locale; use utf8; while ( <> ) { if ( /\/\/ / ) { # Apply long list of regexe-based substitutions print; } }