in reply to Re: Variable Scoping in Perl: the basics
in thread Variable Scoping in Perl: the basics
Try
print "$Robert has canned ${name}'s sorry butt\n";
The apostrophe is the old-style package separator, still supported, so $name's is indeed equivalent to $name::s. By putting the curlies in there, you tell Perl exactly which part of the string to consider part of the variable name, and which part to consider a literal value.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Variable Scoping in Perl: the basics
by aristotle73 (Sexton) on Dec 24, 2004 at 02:11 UTC |
In Section
Tutorials