Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: RE: Permutations and combinations

by I0 (Priest)
on Apr 19, 2002 at 04:17 UTC ( #160432=note: print w/replies, xml ) Need Help??


in reply to RE: Permutations and combinations
in thread Permutations and combinations

your sub swap can be written without $t:
sub swap { my ($i,$j) = @_; @a[$i,$j] = @a[$j,$i]; }

Replies are listed 'Best First'.
Re: Re: RE: Permutations and combinations
by AltBlue (Chaplain) on Apr 19, 2002 at 15:21 UTC
    lol, you bother to look upon this old piece of code :))

    heh, of course that your snippet is good, but a swap routine could be written even simpler:

    sub swap { reverse @_ }
    ... heh, it's not the case for that code thou, as the array is a global one :) cheers.

    --
    AltBlue.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://160432]
help
Chatterbox?
[LanX]: ... a week later they realized that one of the databases - which recorded how much the other banks due to this bank - was not correctly plugged
[ambrus]: Corion: I have no problem with exit codes and shell pipeline. My problem is that the current process requires a lot of manual intervention from me, including editing the source codes.
[ambrus]: (Also a lot of manual intervention by two or three other co-workers, who do other parts of the process.)
[ambrus]: Some of the manual part is unavoidable, but not all.
[choroba]: LanX was there a way to recover the numbers from the remaining information?
[Corion]: LanX: Ow ;)
Discipulus manual work: i just tell the same to my boss: every time the quick solution is to assign some manual data entry task to my group.. because we have not direct access to many databases here..
[LanX]: point is: in high speed trade each bank has to remember what he has to get from the others... so dresdner got billed for losses but couldn't claim gains
Discipulus is this the IT?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-03-29 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.