On 2010-01-22 at 5:06 PM, johndelac...@gmail.com (John Delacour) wrote:
In writing a Perl script I used a subroutine CHECK() and had to
change it because it seems to be a reserved name -- it appears
syntax-coloured blue unlike any of my other subroutines. I do
not generally use the & prefix to run a subroutine,
incidentally. That's probably very very bad, but doesn't seem
to be at the root of my problem.
I can run this without an error:
#!/usr/local/bin/perl
use strict;
CHECK();
though goodness knows what it means, but
#!/usr/local/bin/perl
use strict;
&CHECK();
throws an error (Undefined subroutine).
Both are coloured.
Can someone tell me what I'm missing?
You're probably familiar with BEGIN { ... } blocks.
BEGIN, INIT, CHECK, and END are a words reserved in Perl to name
built-in subroutines that execute at specific stages of your
program's operation.
I'm guessing this gives you enough to explain what was
happening, or to dig further in the right direction.
- Bruce
_bruce__van_allen__santa_cruz_ca_
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem,
please email "supp...@barebones.com" rather than posting to the group.