Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #203473

Re: handling lists in perl

From mick crane <mick.crane@gmail.com>
Newsgroups linux.debian.user
Subject Re: handling lists in perl
Date 2018-12-19 10:30 +0100
Message-ID <x6GkV-7pe-7@gated-at.bofh.it> (permalink)
References (4 earlier) <x6Chj-4Q1-7@gated-at.bofh.it> <x6Ej7-64E-5@gated-at.bofh.it> <x6FoS-6Px-5@gated-at.bofh.it> <x6Fyx-6SG-1@gated-at.bofh.it> <x6Gbf-7lJ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2018-12-19 09:12, mick crane wrote:
> On 2018-12-19 08:34, deloptes wrote:
>> mick crane wrote:
>> 
>>> yes but there is only one 100, only one key can have it.
>>> I still try to figure out what goes on with the hash pairs
>>> with a longer list of numbers your example seems to pick up on the
>>> values somehow.
>>> I dunno, unless there is something about using $_ in a loop being
>>> unreliable ?
>>> I persevere to succeed
>> 
>> (1=>8,2=>20,6=>100,15=>100....)
>> 
>> this is what you originally posted, so both 6 and 15 match 100 from 
>> the list
>> 
>> when key is 6 it compares 100 with each element from the list and 
>> matches
>> 100. Same goes for 15.
>> No idea what you mean!
>> 
>> regards
> 
> 
> given a set of *unique* numbers ( there is just one of the numbers in 
> the list)
> and a list of possible pairings find which pairs you can make from the 
> list.
> 6 can pair with 100 and 15 can pair with 100 but they cannot both be
> in the list of possible pairings because there is only one 100.

just to be a bit clearer.
given a list A of *unique* numbers
and a list B of possible pairings find which pairs you can make from the 
list A.
6 can pair with 100 and 15 can pair with 100 but they cannot both be
in the list of possible pairings because there is only one 100.




-- 
Key ID    4BFEBB31

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-18 14:40 +0100
  Re: handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-18 14:50 +0100
    Re: handling lists in perl deloptes <deloptes@gmail.com> - 2018-12-18 20:10 +0100
      Re: handling lists in perl deloptes <deloptes@gmail.com> - 2018-12-19 01:50 +0100
        Re: handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-19 05:40 +0100
        Re: handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-19 06:10 +0100
          Re: handling lists in perl deloptes <deloptes@gmail.com> - 2018-12-19 08:20 +0100
            Re: handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-19 09:30 +0100
              Re: handling lists in perl deloptes <deloptes@gmail.com> - 2018-12-19 09:40 +0100
                Re: handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-19 10:20 +0100
                Re: handling lists in perl mick crane <mick.crane@gmail.com> - 2018-12-19 10:30 +0100
                Re: handling lists in perl Andy Smith <andy@strugglers.net> - 2018-12-19 18:00 +0100
                Re: handling lists in perl deloptes <deloptes@gmail.com> - 2018-12-19 20:00 +0100
                Re: handling lists in perl David Wright <deblis@lionunicorn.co.uk> - 2018-12-19 21:50 +0100
                Re: handling lists in perl Greg Wooledge <wooledg@eeg.ccf.org> - 2018-12-19 22:10 +0100
    Re: handling lists in perl David Christensen <dpchrist@holgerdanske.com> - 2018-12-19 03:40 +0100
  Re: handling lists in perl Greg Wooledge <wooledg@eeg.ccf.org> - 2018-12-18 15:00 +0100

csiph-web