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 8192441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:10:55+00:00 2026-06-07T04:10:55+00:00

here is what I am doing: I am taking a multidimensional array, or rather,

  • 0

here is what I am doing:

I am taking a multidimensional array, or rather, an array of hashes and trying to pass it into a python script from my perl script. Currently I am converting it to json, and then passing the json string as a literal string into the python script as a parameter.

The array of hashes looks like the following example:

 %HoH = (
id10001 => {
    lat   => "180",
    long  => "-180",
},
id10002 => {
    lat   => "180",
    long  => "-180",
},
id10003 => {
    lat   => "180",
    long  => "-180",
}
);

which i then inside of my perl script, turn into a json string:

{
    "id10001": { "lat": "180", "lon": "-180" },
    "id10002": { "lat": "180", "lon": "-180" },
    "id10003": { "lat": "180", "lon": "-180" },
}

which then is passed into a python script. The python script decodes the json string back into the original constructed array structure.

Is there a better way to pass arrays, or multidimensional arrays from a perl script to a python scrip?

thank you in advance for your help

  • 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-07T04:10:57+00:00Added an answer on June 7, 2026 at 4:10 am

    No, serialization is the only way to pass data through plain character buffer (such as command line arguments, file or whatever) by its very definition. As long as specific serialization format – JSON is this case – naturally covers language-specific structures, you’re all set.

    If you so wish you can experiment with benchmarking libraries for serialization formats available to both Perl and Python to see which will be faster in your case, but at least Perl’s XS implementation of JSON is known to be very fast and routinely beat in speed other available serializers.

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

Sidebar

Related Questions

I'm trying to achieve what this guy here is doing, only in PHP or
What am I doing wrong here? I'm trying to get started with jQuery UI
What am I doing wrong here? private void SendMail(string from, string body) { string
Here is what I'm doing: I'm taking in bezier points and running bezier interpolation
I am currently doing a small data structures project, and I am trying to
In a nutshell here is what I am doing. A business will be taking
I am not sure what I should be doing here. Should I be hardcoding
Can you explain for me what the typedef here is doing and what the
Here I am doing a basic trigger example but jquery is unable to execute
What am I doing wrong here folks? <?php include 'header.php'; /** * Display a

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.