-n causes Perl to assume the following loop around your program [...] LINE: while (<>) { ... # your program goes here }