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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:22:45+00:00 2026-05-15T14:22:45+00:00

On a Solaris box in a mysterious production system I’m running a Perl script

  • 0

On a Solaris box in a “mysterious production system” I’m running a Perl script that references an environment variable. No big deal.

The contents of that variable from the shell both pre- and post-execution are what I expect.

However, when reported by the script, it appears as though it’s running in some other sub-shell which is clobbering my vars with different values for the duration of the script.

Unfortunately I really can’t paste the code. I’m trying to get an atomic case, but I’m at my wit’s end here.

  • 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-05-15T14:22:46+00:00Added an answer on May 15, 2026 at 2:22 pm

    Ok, here’s what was going on:

    perl itself was a red herring entirely.

    The script was executing in a child shell which, when created, was re-loading rc files. Those rc files were blowing away the environment variables I had manually added during the parent shell with reference copies.

    I was able to demonstrate this with a simple csh script that just echoed just echoed the environment.

    De-wonkifying my rc files (which were overwrought with wonkitude) cleared up the mystical replacement.

    UPDATE: The test that proved this was a “test.sh” that had a simple “set” command. It proved that the sub-shell wasn’t inheriting the parent environment correctly. Oddly, when I switched my parent interactive shell to ksh, the environment began inheriting correctly.

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

Sidebar

Related Questions

I'm running a Perl script (both with 5.8.4) on two different machines (one Solaris
I'm running Solaris, so it's possible that this is specific to running GCC on
In benchmarking some Java code on a Solaris SPARC box, I noticed that the
I am running a ruby script that uses Ruby/MySQL and net/ftp. The script is
I'm working on a solaris box. How do I go about deleting all files
On Solaris 9 and 10, both x86 and Sparc, we have a process that
On Solaris, is there a command that I can run to get the MAC
I am trying to install rb-inotify on a Solaris box. Result of uname -a
I am using Solaris x86 box . My application crashes with following stack trace.
I have a strange issue with array manipulation within a bash script on Solaris.

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.