F
fred
I took this from Minimal perl by Tim Maher.
s/\d+ /$& * 1.6/ge
I am trying to add numbers instead of converting miles to KM.
input
2 3 4 1
3 4 6
output
2 3 4 1 = 10
2 4 6 = 12
1. What would the replacement part be ?
2. What should the seach part be if we have ten numbers instead of
four?
Thanks
s/\d+ /$& * 1.6/ge
I am trying to add numbers instead of converting miles to KM.
input
2 3 4 1
3 4 6
output
2 3 4 1 = 10
2 4 6 = 12
1. What would the replacement part be ?
2. What should the seach part be if we have ten numbers instead of
four?
Thanks