John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
Given that
works just fine, why doesmy $m=preprocess::scanfile ($ARGV[0]); print $m;
not work?print (preprocess::scanfile ($ARGV[0]));
It produces a error "print() on unopened filehandle preprocess::scanfile"
Without the outer parens, I can understand that it looks like an indirect object, and other posts here have pointed out that this takes precedence. But with the parens, it looks like a function, so "it is a function", right?! Why does it still think it's an indirect object?
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'print' puzzle
by chipmunk (Parson) on Nov 12, 2001 at 09:39 UTC | |
|
(jeffa) Re: 'print' puzzle
by jeffa (Bishop) on Nov 12, 2001 at 09:53 UTC | |
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 00:13 UTC | |
by clintp (Curate) on Nov 13, 2001 at 01:16 UTC | |
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 03:18 UTC | |
by clintp (Curate) on Nov 13, 2001 at 04:25 UTC | |
by blakem (Monsignor) on Nov 13, 2001 at 01:32 UTC | |
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 03:14 UTC | |
by chromatic (Archbishop) on Nov 13, 2001 at 06:01 UTC | |
| |
by blakem (Monsignor) on Nov 13, 2001 at 03:45 UTC | |
|
Re: 'print' puzzle
by blakem (Monsignor) on Nov 12, 2001 at 09:25 UTC | |
|
(tye)Re: 'print' puzzle
by tye (Sage) on Nov 12, 2001 at 22:27 UTC | |
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 00:14 UTC | |
by tye (Sage) on Nov 13, 2001 at 01:43 UTC | |
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 03:24 UTC | |
by tye (Sage) on Nov 13, 2001 at 09:04 UTC |