in reply to Re: Use of uninitialized value in concatenation
in thread Use of uninitialized value in concatenation
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use of uninitialized value in concatenation
by gem555 (Acolyte) on Jun 11, 2009 at 11:20 UTC | |
by AnomalousMonk (Archbishop) on Jun 11, 2009 at 15:20 UTC | |
by Anonymous Monk on Jun 12, 2009 at 04:08 UTC | |
by AnomalousMonk (Archbishop) on Jun 12, 2009 at 15:48 UTC |