# ... use strict; # ... require Fcntl; import Fcntl ':mode'; my $default = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH; # ...
That caused fatal errors by virtue of S_* constants being barewords. They are not recognized as subs during the compile time (since above happens outside of BEGIN), thus cause the "bareword" error.
Add () and one is back in business ...
# ... use strict; # ... require Fcntl; import Fcntl ':mode'; my $default = S_IRUSR() | S_IWUSR() | S_IRGRP() | S_IWGRP() | S_IRO +TH(); # ...
CON#$T&ANT;!()
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: require, import, & barewords by way of constants
by Corion (Patriarch) on Apr 24, 2012 at 15:53 UTC | |
by Anonymous Monk on Apr 24, 2012 at 16:13 UTC |