in reply to Re: perl one liner to print a line
in thread perl one liner to print a line
4 chars shorter:
perl -ne'print,last,if$.==4' 12345678901234567890123 23
Update: 5 chars shorter:
perl -nlE'say,last,if$.==4' 1234567890123456789012 22
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl one liner to print a line
by jwkrahn (Abbot) on Dec 12, 2008 at 07:17 UTC | |
by ikegami (Patriarch) on Dec 12, 2008 at 07:28 UTC | |
|
Re^3: perl one liner to print a line
by mr_mischief (Monsignor) on Dec 12, 2008 at 15:07 UTC |