#!usr/bin/perl use strict; use warnings; while (<>) { print "$.\t$_"; # updating $. $.\t$_ } continue { close ARGV if eof; }