Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Environment Variables in YAML

by afoken (Chancellor)
on Nov 17, 2015 at 05:10 UTC ( [id://1147879]=note: print w/replies, xml ) Need Help??


in reply to Environment Variables in YAML

No. But you could do that after reading the YAML file, using s///. Something like this:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $hashref={ ABC => 123, PATH => '$ENV{PATH}' }; print Dumper($hashref); s/\$ENV{(.+?)}/$ENV{$1}/g for values %$hashref; print Dumper($hashref);

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-19 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found