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

  • SEARCH
  • Home
  • 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 169607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:39:39+00:00 2026-05-11T12:39:39+00:00

I am looking for best, easiest way to do something like: $var1=value; bunch of

  • 0

I am looking for best, easiest way to do something like:

$var1='value'; bunch of code..... **print allVariablesAndTheirValuesCurrentlyDefined;** 
  • 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. 2026-05-11T12:39:40+00:00Added an answer on May 11, 2026 at 12:39 pm

    Package variables? Lexical variables?

    Package variables can be looked up via the symbol table. Try Devel::Symdump:

    #!/path/to/perl  use Devel::Symdump;  package example;  $var = 'value'; @var = ('value1', 'value2'); %var = ('key1' => 'value1', 'key2' => 'value2');  my $obj = Devel::Symdump->new('example');  print $obj->as_string(); 

    Lexical variables are a little tricker, you won’t find them in the symbol table. They can be looked up via the ‘scratchpad’ that belongs to the block of code they’re defined in. Try PadWalker:

    #!/path/to/perl  use strict; use warnings;  use Data::Dumper; use PadWalker qw(peek_my);  my $var = 'value'; my @var = ('value1', 'value2'); my %var = ('key1' =>  'value1', 'key2' => 'value2');  my $hash_ref = peek_my(0);  print Dumper($hash_ref); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for the best/easiest way to programmatically grab the name of the US
I'm looking for the best way (or easiest way) to manage multiple instances of
I'm looking for the best/easiest way to add extensions to an existing protocol (can't
Looking for best advice on how to do this: I have an insert like
I'm looking for best way of using session within zf application. At first I
Looking for the best way to set-up an iPhone project in XCode ... namely:
I am looking for an appropriate pattern and best modern way to solve the
I am looking for the easiest way to solve this problem. I have a
I am looking for the easiest and fastest way to create a folder in
What is the best/cleanest/easiest way to maintain the edit history of records in Rails?

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.