#!/usr/bin/perl #program name: perlread2.pl open (FILEIN, "students") || warn "could not open students file\n"; while ( <FILEIN>) { print "$_"; ++$line_count; } print ("File \"students\" has $line_count lines. \n"); close (FILEIN);