grep -n "^" test.pl | test.pl #!/usr/bin/perl # Perl program test.pl use strict; use warnings; while ( <> ) { chomp; s/:/ /; print "$_\n"; }