http://www.perlmonks.org?node_id=94809


in reply to Determining what line a filehandle is on

hey I might as well throw in my two cents worth of code ..
#!/usr/bin/perl $|++ use strict; use warnings; open(my($fd),q(/usr/dict/words)) or die($!); print qq(\r$.) while(<$fd>); print qq(\n);

Brought to you by that crazy but lovable guy... lindex