Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: how perl do 'envsubst'

by vincentaxhe (Scribe)
on Jul 03, 2024 at 09:57 UTC ( [id://11160336]=note: print w/replies, xml ) Need Help??


in reply to Re: how perl do 'envsubst'
in thread how perl do 'envsubst'

thanks for your answer, I didn't know Path::Tiny do the work as File::Slurp, and $fh->print is same as print $fh, I have finished the script, all works great, the process substitution of shell is pipe to /dev/fd/ in essence

Replies are listed 'Best First'.
Re^3: how perl do 'envsubst'
by NERDVANA (Priest) on Jul 03, 2024 at 18:41 UTC
    Yep, you can see it in action with
    $ echo <(echo foo) /dev/fd/63
    But, now I just realized there is still a mystery!
    $ ls /dev/fd 0 1 2 3
    So... how can a program open /dev/fd/63 if it doesn't exist?
      So... how can a program open /dev/fd/63 if it doesn't exist?

      Because it does exist at the time the command is run:

      $ echo <(echo foo) $(ls /dev/fd) /dev/fd/63 0 1 2 3 63

      Greetings,
      🐻

      $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
        Ah-ha! I forgot /dev/fd was a symlink to /proc/self/fd.
      if run kmonad <(echo $config), could bind to /dev/fd/61; but use perl only /dev/fd/0 is guaranteed to exist, cann't change to others;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2025-11-11 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (67 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.