eyepopslikeamosquito wrote:

I'm interested to learn the backstory behind this question. What real world problem are you trying to solve?

I'm glad you asked. I don't know how "real" my world is ;-) but the quick answer is that I want to fashion a Perl program to save and display the entire ENV of the current process as YAML. I am just fascinated by the operating system's management of forked or spawned child processes and the way in which these child processes inherit an environment from the parent. In particular, this interests me on Windows with Cygwin, when some of the ENV comes from Cygwin initialization and some from the "larger" Windows system ENV. In real-world situations, sometimes the ENV contains contradictory or troublesome entries that I want to know about, so I can perform knowledgeable systems management and good defensive programming.

Since you mention Cygwin, is your code required to run on both Windows and Unix?

Hmm. Well, at present my ambitions are limited to having my code run on Cygwin, and not on unix in general. That could change if I can get a handle on preparing data to Load() and then Dump() with the YAML module (actually the implementation I am using is YAML::XS).

Thanks for the references to nodes you felt related to this topic. I will read them soon.

    - Soren

Jul 21, 2025 at 01:47 UTC

In reply to Re^2: Using Perl's open() to investigate bash login environment by Intrepid
in thread Using Perl's open() to investigate bash login environment by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.