Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Add a fixed number of unique elements to hash [sample() vs. shuffle()]

by Vasek (Acolyte)
on Mar 05, 2023 at 23:13 UTC ( [id://11150767]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Add a fixed number of unique elements to hash [sample() vs. shuffle()]
in thread Add a fixed number of unique elements to hash

Many thanks for your replies and testing, but the target machine is running Perl 5.004 (unfortunately I wasn't precise enough when I just wrote Perl 5). The final solution was to use splice as suggested by jwkrahn in the next post.

Replies are listed 'Best First'.
Re^5: Add a fixed number of unique elements to hash [sample() vs. shuffle()]
by davido (Cardinal) on Mar 06, 2023 at 03:41 UTC

    What kind of machine are you running Perl 5.004 on?

    Seriously, you've peaqued my curiosity. You have some old desktop system from 1998 up and running? Anything newer than that, you would have upgraded to a more modern version of Perl long ago. Perl 5.004 is 25 years old.


    Dave

      Hi Dave, yes I have an old O2 computer with the amazing irix 6.5.22 operating system. At my first IT job these machines were still used for oil pipe design (along with some other SGI machine, eg. Indigo, Octan and Indy) and when they were scrapped I couldn't resist the temptation to buy a few (Indy and O2). The last still working Indy is now in the attic, but I still use an O2 in my carpentry workshop for listening to music :-)

      hippo thx for the link you shared!

      Best whishes, Vasek

        "Honey, why do you need another 3 phase outlet in the workshop? Did buy another CNC machine???"

        "No, it's for the MP3 player."

        PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

        That's pretty amazing.

        I was thinking back to where I was when 5.004 was around. I was barely getting interested in Perl at that time. I'm pretty sure some of the OReilly books I bought had a little banner in the corner saying "Updated for Perl 5.004." Most of my programming at the time would have been in C, some Borland C++, or on one computer I had, some version of Turbo Pascal. Perl was an eye-opener, coming from those sorts of languages.


        Dave

      You have some old desktop system from 1998 up and running?

      In the OP Vasek did say it was an SGI O2 so the date range fits. They were nice machines, if a bit temperamental.


      🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-28 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found