#! /usr/bin/perl use strict; use warnings; use 5.010; # read from STDIN (or read from files given as arguments) while ( my $line = <> ) { chomp $line; say "I got: $line"; }