Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constant treated as literal when concatenating at beginning of string

Status
Not open for further replies.

elliottmina

Programmer
Feb 6, 2005
12
0
0
US
I am trying to build a string using a constant, but if I do so with the constant at the beginning of the string, it treats it as a literal.

For example:

use constant FOO => "abc";

print FOO . "def"; # prints FOOdef
print "" . FOO . "def"; # prints abcdef

Any advice? Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top