Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by mothra (Hermit)
on Apr 04, 2002 at 14:25 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://156667]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-09-14 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.