A possible solution for the cabeza.pl
program is as follows:
#!/usr/bin/perl # cabeza.pl - print the first 10 lines of a given file use warnings; use strict; # This is the first argument on the command line # Check that file exists and is readable unless (-r $filename) { } my $lineno = 0; while (<IN>) { $lineno++; }