I think the OPer wants '$foo' to be replaced by 'dollarfoo'. And what's with the extra spaces?>perl -wMstrict -le "my %words = map { $_ => 1 } qw($Word $name); my $line = '$Word $ $foo'; $line =~ s/(\$\w*)/exists $words{$1} ? $1 : qq{ dollar }/eg; print $line; " $Word dollar dollar
In reply to Re^2: Use of uninitialized value in concatenation
by AnomalousMonk
in thread Use of uninitialized value in concatenation
by gem555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |