Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Perl vs. Python: Looking at the Code

by mothra (Hermit)
on Apr 04, 2002 at 14:25 UTC ( #156667=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ time ./wc.py wc.pl wc.py large.txt
         21      58     494 wc.pl
    ...
    real    0m4.484s
    user    0m4.186s
    sys     0m0.093s
    
  2. or download this
    #!/usr/bin/python
    import sys
    ...
        Tchars += chars
    if len(sys.argv) > 2:
        print "%7d %7d %7d total" % (Tlines, Twords, Tchars)
    
  3. or download this
    $ time ./wc.py wc.pl wc.py large.txt
         21      58     494 wc.pl
    ...
    real    0m6.157s
    user    0m6.046s
    sys     0m0.124s
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2019-02-23 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (119 votes). Check out past polls.

    Notices?