#!/usr/bin/perl -s use strict; our ($i); my $enpt =0; my $pten =1; if($i){ ($enpt,$pten)=(1,0) } undef $/; while(<>){ if($pten){print pten($_)} if($enpt){print enpt($_)} } sub enpt{my $linha=shift; $linha =~ s!(#[MFCSBX]+)! $1 =~ y/MFCSB/MPFSI/r !ge; $linha } sub pten{my $linha=shift; $linha =~ s!(#[MPFSIX]+)! $1 =~ y/MPFSI/MFCSB/r !ge; $linha } __END__ #/ #= #doc #bio #dono owns #mecenas_de mecenas_of #morou lived_in #ver-doc in-doc