Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Scoping Variables

by Anonymous Monk
on May 18, 2001 at 18:13 UTC ( [id://81506]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Scoping Variables
in thread Scoping Variables

Yes, you are missing something really simple here. It's called interpolation and it happens inside double quotes. Put this in a script and run it. $x=1; print 'single quoted dollar x is $x'; print "\n"; print "double quoted dollar x is $x"; print "\n"; perl -e '

Replies are listed 'Best First'.
Re: Re: Re: Re: Scoping Variables
by Anonymous Monk on May 18, 2001 at 18:14 UTC
    WHOOPS, Sorry. That should have been
    $x=1; print 'single quoted dollar x is $x'; print "\n"; print "double quoted dollar x is $x"; print "\n";
Re: Scoping Variables
by Clachair (Acolyte) on May 19, 2001 at 03:37 UTC
    Many thanks.
    Neither of my enormous tomes containing Perls of wisdom explained that one!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-24 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found