Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re (tilly) 1: (jj808) Re: (zdog) Re: One-Line Web Counter

by tilly (Archbishop)
on Sep 09, 2001 at 21:21 UTC ( #111297=note: print w/ replies, xml ) Need Help??


in reply to (jj808) Re: (zdog) Re: One-Line Web Counter
in thread One-Line Web Counter

Well leaving aside locking issues, and the point that the number 2 by itself is not exactly valid html, here is the above made even shorter.

perl -MCGI -pi -e 'END{print&CGI::header,$t}s/\d+/$t=$&+1/e' c
UPDATE
And, of course, there is always a shorter way:
perl -MCGI -pi -e'END{print&CGI::header,$t}$t=++$_' c


Comment on Re (tilly) 1: (jj808) Re: (zdog) Re: One-Line Web Counter
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-07-06 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls