I'm afriad I'm unable to duplicate that here. I get the warning both when I -c it, and when I run it which, as far I as I know, is the correct behavior. This is with both ActiveState perl, and Cygwin perl.

Perhaps you can post the code that's causes that behavior? You're not on 5.8.0, are you? Both of my perl's are 5.6.1. *shrug*

(Output from my test below)

[johnsca@CORY tmp]$ cat tst #!/usr/bin/perl use warnings; use strict; sub foo { return 3 } *blah = \&foo; [johnsca@CORY tmp]$ perl -c tst Name "main::blah" used only once: possible typo at tst line 8. tst syntax OK [johnsca@CORY tmp]$ ./tst Name "main::blah" used only once: possible typo at ./tst line 8. [johnsca@CORY tmp]$ perl -v This is perl, v5.6.1 built for cygwin-multi Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge. [johnsca@CORY tmp]$ /win2k/Perl/bin/perl tst Name "main::blah" used only once: possible typo at tst line 8. [johnsca@CORY tmp]$ /win2k/Perl/bin/perl -v This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 633 provided by ActiveState Corp. http://www.ActiveState. +com Built 21:33:05 Jun 17 2002 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge.

bbfu
Black flowers blossum
Fearless on my breath


In reply to (bbfu) (warning only during -c) Re3: 'used once' during perl -c by bbfu
in thread 'used once' during perl -c by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.