#!/usr/bin/perl -w print "This will reverse all lines.\n"; @input = <>; print reverse(@input);