Help for this page

Select Code to Download


  1. or download this
    $ENV{VARIABLE} = '/base/path';
    $_ = '$ENV{VARIABLE}/my/path';
    
    s/\$ENV\{(\w+?)\}/$ENV{$1}/g;
    print;
    
  2. or download this
    $ENV{VARIABLE} = '/base/path';
    $path = 'path';
    ...
    s/\$(\w+)\{(\w+?)\}/${$1}{$2}/g;
    s/\$(\w+)/${$1}/g;
    print;