Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: How to loop over two lines, alter a value in the current line and save it to the previous line?

by 1nickt (Canon)
on Jan 07, 2016 at 12:43 UTC ( [id://1152178]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    baz 3
    qux 4
    
  2. or download this
            prev   current
    input:  nul 0  foo 1
    ...
    
    input:  baz 6  qux 4
    output: qux 10 qux 10
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found