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

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.

Replies are listed 'Best First'.
Re^6: -bash: use
by KW7 (Initiate) on Jul 01, 2017 at 18:23 UTC

    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; }

      I think we need to take several steps back here.

      What are you trying to do? What is your situation? What is the exact code you are trying to run?