Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Variable Scoping in Perl: the basics

by Aristotle (Chancellor)
on Dec 23, 2004 at 20:50 UTC ( [id://417232]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 23, 2004 at 21:11 UTC
    Thanks :D It works ^_^

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://417232]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.