#!/usr/bin/perl -w %r = @ARGV; while () { while (($a, $b) = each %r) { s/$a/$b/g; } print; }