in reply to Re^2: -bash: use
in thread -bash: use

Are you trying to run your module?

That's not how modules work.

Maybe show us what you are actually doing?

Replies are listed 'Best First'.
Re^4: -bash: use
by KW7 (Initiate) on Jul 01, 2017 at 18:14 UTC
    Craigs-MacBook-Pro:Perl craiglavallee$ use -bash: use: command not found

      A module is not intended to be run directly.

      Write your code as a Perl script, save it as myscript.pl and run it as:

      perl myscript.pl
Re^4: -bash: use
by KW7 (Initiate) on Jul 01, 2017 at 18:11 UTC
    use Module VERSION

      Dude... you are going to start upsetting people by not providing the information they have requested.

      Show your code.

      Show us how you are *RUNNING YOUR CODE*.

      What is happening is that your bash shell does not have any clue that what you're trying to run is Perl code.

      Try this:

      perl script.pl

      Or put:

      #!/usr/bin/perl

      ...at the top of the script.

        Thanks - sorry about that. This isn't my code, from CPAN

        Use several modules in command line:

        % perl -Muse=CGI,DBI,PPI -e '...' # Import several modules at once use use qw[ strict warnings methods invoker ]; # Pass options as array refs use use 'strict', 'warnings', 'HTTP::Status' => [':constants']; # Pass required versions after module names use use '5.12.0', 'HTTP::Status' => '6.00' => [':constants']; # ...or in your own module, importing on behalf of its caller: package MY::Macro; sub import { use use; local @_ = qw[ Module1 Module2 ]; goto &use::use; }
Re^4: -bash: use
by KW7 (Initiate) on Jul 01, 2017 at 18:08 UTC
    yes, but I can not run the module use -bash: use: command not found. This module lets you import several modules at once. loaded from cspan