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!