Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: awk has its place

by davorg (Chancellor)
on Mar 30, 2001 at 19:38 UTC ( [id://68404]=note: print w/replies, xml ) Need Help??


in reply to awk has its place
in thread AWK and Perl on UNIX

I'd do that as:

ls -l|perl -pale '$_=$F[4]'

which saves a couple of characters. I know what you mean, but I forgot most of the awk and sed that I ever knew when I learnt Perl.

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me

Replies are listed 'Best First'.
Re: Re: awk has its place
by grinder (Bishop) on Mar 30, 2001 at 19:51 UTC

    True enough, but using fewer characters isn't necessarily faster (to type). There's four switches needed, whereas that p-r-i-n-t just rolls off the finger r-l-r-r-l and that tick dollar underscore equals dollar F has you bouncing up and down on the shift key. It just ain't as smooth.

    Reflecting on this, the few vestiges of awk that remain are more in my fingers than in my head.


    --
    g r i n d e r

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://68404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found