in reply to Re: Idle search for a file-read idiom
in thread Idle search for a file-read idiom
Oh, you say you want a longer script. Like from a file.
Prints the file on the command line with linenumbers added and prints a summary.#!/usr/bin/perl -wn BEGIN{$num=0}; print ++$num,' ',$_; END{print "\nDo some processing outside of the loop.\n"}
|
|---|