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

Re^2: Abusing Map (Corrected second code block)

by ikegami (Patriarch)
on May 18, 2018 at 08:11 UTC ( [id://1214819]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @b;
    $b[ $_-1 ] = $a[ $_-1 ] - $a[ $_ ] for 1 .. $#a;
    
  2. or download this
    my @b;
    $b[ $_ ] = $a[ $_ ] - $a[ $_+1 ] for 0 .. $#a-1;
    
  3. or download this
    my @b = @a;
    $b[ $_ ] -= $b[ $_+1 ] for 0 .. $#b-1;
    pop @b;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found