Example $i = 1; while ($line = ) { print "$i: $line"; $i++; } This program prints the lines from standard input with line numbers. while ($line = <>) { print $line; } This program works like the UNIX command `cat'.