The thread perl how can I append STDOUT of list form system call of perl script to a file led to the following solution: use IPC::Run qw( run );
. On my macos 10.14.6 running perl 5.18.4, this threw an error: Can't locate IPC/Run.pm in @INC (you may need to install the IPC::Run module)
. Accordingly, following What's the easiest way to install a missing Perl module?, I did
> cpan IPC::Run
<snip: 403 lines later>
Appending installation info to /Users/BNW/perl5/lib/perl5/darwin-thread-multi-2level/perllocal.pod
TODDR/IPC-Run-20180523.0.tar.gz
/usr/bin/make install -- OK
and rebooted my MacBookPro. And I edited my perl script, bosswrap.pl
, to start
#!/usr/bin/perl
use strict; use warnings;
use IPC::Run qw( run );
but this again throws apparently the same error as before:
> bosswrap.pl
Can't locate IPC/Run.pm in @INC (you may need to install the IPC::Run module) (@INC contains: /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Users/BNW/u/kh/bin/bosswrap.pl line 3.
BEGIN failed--compilation aborted at /Users/BNW/u/kh/bin/bosswrap.pl line 3.
What am I doing wrong, or rather, how can I get this to work?
set | grep ^PERL; echo 'o conf' | cpan
/Users/BNW/perl5/lib
needs to be added to env varPERL5LIB
.