Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: DIFFERENCE BETWEEN VARIABLE

by quidity (Pilgrim)
on Jan 31, 2001 at 17:20 UTC ( #55471=note: print w/ replies, xml ) Need Help??


in reply to DIFFERENCE BETWEEN VARIABLE

There is no difference, as far as perl is concerned, this is often a useful construct (albeit without the ' ' characters) which allows variables to be interpolated in strings next to other [A-Za-z_] characters:

$varname = 'poke'; print "${varname}mon\n";

Will output:

pokemon

while you could not have said:

print "$varnamemon\n";

as there is no such variable. You could avoid this by using . instead, but you'll see instances of the construct above.


Comment on Re: DIFFERENCE BETWEEN VARIABLE
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://55471]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-07-06 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls