#!/usr/bin/env perl while (<>) { chomp(); print reverse($_) . $/ }