cheekuperl has asked for the wisdom of the Perl Monks concerning the following question:
This is perl, version 5.004_04$ perl -e 'print cat' # Doesn't print anything. But 1 bareword is OK $ perl -e 'print cat dog' #Doesnt like two barewords Can't locate object method "cat" via package "dog" at -e line 1. $ perl -e 'print reverse cat' #Prints cat. OK with one again. cat$ perl -e 'print reverse cat dog' # Still hates two Can't locate object method "cat" via package "dog" at -e line 1.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Bareword rules?
by davido (Cardinal) on Aug 23, 2012 at 05:19 UTC | |
by cheekuperl (Monk) on Aug 23, 2012 at 06:03 UTC | |
Re: Bareword rules?
by moritz (Cardinal) on Aug 23, 2012 at 05:44 UTC | |
by cheekuperl (Monk) on Aug 23, 2012 at 06:08 UTC | |
Re: Bareword rules?
by mr.nick (Chaplain) on Aug 24, 2012 at 15:18 UTC |