UPDATEgonzo:/export/home/fredk/docs/test: more foo.pl #!/usr/local/bin/perl use strict; package foo; sub bar { print "Works\n"; } package main; my $var = "bar"; foo->$var; gonzo:/export/home/fredk/docs/test: ./foo.pl syntax error at ./foo.pl line 10, near "$var;" Execution of ./foo.pl aborted due to compilation errors.
This works if I change foo->$var to foo->$var();
Can someone confirm this is a 5.005 thing?
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
In reply to Re: Re: Syntax question...
by freddo411
in thread Syntax question (Perl 5.005)...
by freddo411
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |