Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: reset of match variables

by AnomalousMonk (Abbot)
on Oct 03, 2011 at 22:25 UTC ( #929424=note: print w/ replies, xml ) Need Help??


in reply to Re: reset of match variables
in thread reset of match variables

With warnings and strictures:

>perl -wMstrict -lne "$::SUM += /(\d+)/ && $1; END { print $::SUM } " foo123bar foo xxx111ccc xxx ^Z 234


Comment on Re^2: reset of match variables
Download Code
Re^3: reset of match variables
by bart (Canon) on Oct 04, 2011 at 11:31 UTC
    Jeezes, who would want to use strict and a workaround for a one-liner??

      I write 550 character long one-liners (anything above that I convert to a script file), and I do often use strict in them.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-12-27 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls