<?xml version="1.0" encoding="windows-1252"?>
<node id="417232" title="Re^2: Variable Scoping in Perl: the basics" created="2004-12-23 20:50:53" updated="2005-07-28 19:30:18">
<type id="11">
note</type>
<author id="114691">
Aristotle</author>
<data>
<field name="doctext">
&lt;p&gt;Try&lt;/p&gt;

&lt;code&gt;
print "$Robert has canned ${name}'s sorry butt\n";
&lt;/code&gt;

&lt;p&gt;The apostrophe is the old-style package separator, still supported, so &lt;tt&gt;$name's&lt;/tt&gt; is indeed equivalent to &lt;tt&gt;$name::s&lt;/tt&gt;. 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.&lt;/p&gt;

&lt;p align="right" class="pmsig pmsig-114691"&gt;&lt;em&gt;Makeshifts last the longest.&lt;/em&gt;&lt;/p&gt;</field>
<field name="root_node">
66677</field>
<field name="parent_node">
416283</field>
</data>
</node>
