$. is the current line number that you can use in your printf?|say statement ...
printf( qq[%04d %s\n], $., $line );
In reply to Re: print complete line along side line number, when a pattern is matched in log file
by parv
in thread print complete line along side line number, when a pattern is matched in log file
by noviceuser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |