For $foo it prints dollar and not dollarfoo. But still gets a warning message#!/usr/bin/perl -w use strict; my %words = map { $_ => 1 } qw($Word $name); my $line = '$Word $ $foo'; $line =~ s/(\$\w*)/exists $words{$1} ? $1 : qq{ dollar }/eg; print $line;
In reply to Re^3: Use of uninitialized value in concatenation
by gem555
in thread Use of uninitialized value in concatenation
by gem555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |