Leser: 2
7 Einträge, 1 Seite |
$HOME/$USER/info.txt
s/\$HOME/$ENV{HOME}/
s/\$(\w*)/$ENV{$1}/g
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
use warnings;
use strict;
my @array = ('$HOME', '$USER');
print join("\n", @array), "\n";
map {
s%\$([A-Z]+)%\$ENV{$1}%;
} @array;
print join("\n", @array), "\n";
my $path =~ s/\$\w+(?=\/)/$subst_var/;
7 Einträge, 1 Seite |