Search notes:

Perl operator: <> (diamond)

use warnings;
use strict;


#
#  Read each line of each file given in @ARGV or, if empty, 
#  read from STDIN
#
#  Test:
#     perl diamond.pl slash_slash.pl does-not-exist.txt diamond.pl
#     perl diamond.pl
#
while (my $line = <>) {

  printf ("%4d: %s", $., $line);

}
Github repository about-perl, path: /operators/diamond.pl

See also

Perl operators

Index