-bash: use: command not found
-bash: use: command not found
iMac
-bash: use: command not found
iMac
Writing an effective Apple Support Communities question.
We are not looking over your shoulder to see what you were doing when this occurred. More information about what you were attempting to do, or achieve would help with the answer you receive. There is no UNIX “use” command, which is why the Bash shell uttered “command not found.” There is a users command.
Well you are not invoking the perl script with perl, but rather it is being run as if it is a bash shell script.
Try either invoking your script
perl your.script.file
or edit your perl script to put the following as the first line
#!/usr/bin/perl
Post the perl script. Need to review the use clauses. However, if your perl script has omitted the she-bang for perl:
#!/usr/bin/perl
use strict;
then running this in the Bash shell will produce: ./foo.pl: line 1: use: command not found
#!/usr/bin/perl
use strict;
will work correctly.
mac darwin has perl 5.18 on it and I used cpan for the module. some of the modules I have loaded follow:
Text::Template
Thread::Queue
Thread::Semaphore
Tie::File
Time::HiRes
Time::Local
Time::Piece
Unicode::Collate
Unicode::Normalize
XSLoader
autodie
autouse
base
bignum
constant
if
inc::latest
parent
perlfaq
threads
threads::shared
use
version
This isn't a script but module. I downloaded the module from CPAN. Some of the modules I have follow:
Text::Template
Thread::Queue
Thread::Semaphore
Tie::File
Time::HiRes
Time::Local
Time::Piece
Unicode::Collate
Unicode::Normalize
XSLoader
autodie
autouse
base
bignum
constant
if
inc::latest
parent
perlfaq
threads
threads::shared
use
version
You still haven't posted the beginning of your script so we can see how you are introducing these modules to your code. And, have you reviewed each use clause with perldoc in the Terminal (e.g. perldoc Unicode::Normalize) to verify proper syntax?
Are your modules in the expected location?
perl -MUnicode::Normalize -E 'say $INC{"Unicode/Normalize.pm"}'
/System/Library/Perl/5.18/darwin-thread-multi-2level/Unicode/Normalize.pm
/Library/Perl/5.18/darwin-thread-multi-2level/Unicode/Normalize.pm Any module I try to run has the same problem. Some modules loaded follow:
Text::Template
Thread::Queue
Thread::Semaphore
Tie::File
Time::HiRes
Time::Local
Time::Piece
Unicode::Collate
Unicode::Normalize
XSLoader
autodie
autouse
base
bignum
constant
if
inc::latest
parent
perlfaq
threads
threads::shared
use
version
I am using perl 5.18 on the mac which is standard and has use
-bash: use: command not found