in reply to Re: Re: Undefined subroutine
in thread Undefined subroutine

... (as I renamed my module) on my MS machine but get a blank line returned.
That's to be expected as you're no longer including Test.pm. If you change the -M switch to -MJ9Test it will output the path to J9Test.pm relative to @INC.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: (3) Undefined subroutine
by J9 (Beadle) on Mar 11, 2003 at 14:48 UTC
    BLUSH..

    Tried ...
    perl -MJ9Test -le print $INC{"J9Test.pm"};
    Still got a blank line though.
      Quotes are your friend ...
      shell> cat > J9Test.pm package J9Test; 1; shell> perl -MJ9Test -le print $INC{"J9Test.pm"}; shell> perl -MJ9Test -le print@ARGV $INC{"J9Test.pm"}; {J9Test.pm} shell> perl -MJ9Test -le 'print $INC{"J9Test.pm"};' J9Test.pm
      Although the above was performed on a linux box using bash (so you might get a different result in a different shell), I'm pretty sure that $INC{"J9Test.pm"} is being passed as the last argument to perl.
      HTH

      _________
      broquaint