in reply to Error while printing a variable
_ is a valid character in an identifier so Perl sees $profile_name_ as a variable name. To avoid the problem you can:
print "\n${profile_name}_$opt_$date\n";
Note the {} to delimit the variable name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error while printing a variable
by toolic (Bishop) on Mar 24, 2011 at 01:23 UTC |