in reply to Re^2: Is space supposed to be ignored between a sigil and its variable name?
in thread Is space supposed to be ignored between a sigil and its variable name?

What do those print, and why?  (Without cheating and running the code! :)

#!/usr/bin/perl $foo = "foo"; print "1: $ $ $ foo\n"; print "2: $ $$ foo\n"; print "3: $ $$foo\n"; print "4: $$$foo\n";
  • Comment on Re^3: Is space supposed to be ignored between a sigil and its variable name?
  • Download Code

Replies are listed 'Best First'.
Re^4: Is space supposed to be ignored between a sigil and its variable name?
by Bloodnok (Vicar) on Apr 19, 2009 at 00:17 UTC
    Excellent exercise :D

    Okay, okay, I admit it - I got 1 right, but the other 3 flummoxed me, so I ... well I cheated!!

    Now I know what they all print - all that's left to do now is the hard part i.e. RTFM & work out why ...

    A user level that continues to overstate my experience :-))