Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7885981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:12:25+00:00 2026-06-03T05:12:25+00:00

This is the whole script, that for some mysterious to me reason outputs 642

  • 0

This is the whole script, that for some mysterious to me reason outputs “642”

#!usr/bin/perl 
%vvv = (1,2,3,4,5,6);
$#vvv--;
%vvv = reverse %vvv;
print keys %vvv, "\n";

Also what does “keys” in the last statement do? Thanks for your time. I am just on hurry I don’t have proper time to do my research. So again I appreciate you input.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:12:26+00:00Added an answer on June 3, 2026 at 5:12 am

    $#vvv– looks like a comment. What’s happening is the hash, being an even numbered element array, is just being reverse. So it goes from:

    %vvv = (
        1 => 2,
        3 => 4,
        5 => 6
    );
    

    to:

    %vvv = (
        6 => 5,
        4 => 3,
        2 => 1
    );
    

    So when the keys are printed, it grabs 642, or the new, current keys of the hash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a bash script that reads input from a file like this: while
I wrote a script that performs some adjustments, saves then closes the image: preferences.rulerUnits
I have a script that I need to reverse engineer, but the script appears
I have a batch script that dynamically creates some files and generates four files
I have a perl script that is used to monitor databases and I'm trying
I have a PowerShell script that does some checks on all Domain Admins in
I have a PHP script that I am using to generate some rather complicated
G'day, We have a Perl script that is processing geolocation requests from the head-end
I have a JS script that changes content of webpages. I use this script
I have a small script here that I need some help with: for song

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.