Questions tagged [perl]

A widely used cross platform scripting language that is installed in OSX.

Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

What are prerequisites for using perlbrew?

I want to send a Perl app I wrote to a simple Mac "end-user". He's running Monterey, but he isn't a Developer, he doesn't have Xcode, and I'm going to have to hand-hold him through using the ...
user avatar
  • 1,080
0 votes
1 answer
24 views

"cpan install" trying to use /sw/bin/tar (instead of /usr/bin/tar)

I'm having no luck getting CPAN modules to install on my M1 Mac running Big Sur. They all seem to be trying to use /sw/bin/tar to untar the archives, but there is nothing there; tar is in /usr/bin/...
user avatar
  • 103
2 votes
0 answers
164 views

Can't set any perl version as default in Macports

I installed perl_select, which I don't think, I've had to do for any other application. Despite that I cannot set any version of Perl as default as I easily can for python. % port echo installed | ...
user avatar
  • 369
0 votes
0 answers
544 views

How do I need to configure the macOS logging system to log LOG_INFO messages from Perl?

In the dovecot port for macOS in MacPorts, there is a pushnotify capability (requires you to be able to create the right certificates). This is perl code that contains the following snippet: # Open ...
user avatar
  • 574
0 votes
1 answer
171 views

Running perl shell script from AppleScript on Mojave

I have a simple AppleScript that calls a perl shell script to replace a string with another string (here one with two) in files with specified file extensions (here .txt and .xyz). It used to work ...
user avatar
  • 696
0 votes
0 answers
359 views

CPAN module on macOS: Warning: Cannot install xxx, don't know what it is

I am trying to install a Perl module. > cpan rajce-get Reading '/Users/Ivanov/.cpan/Metadata' Database was generated on Fri, 04 Oct 2019 23:17:03 ...
user avatar
  • 3,407
0 votes
1 answer
617 views

How do I restore default perl in macOS Mojave?

Is there a way to restore default perl5 and cpan modules in Mojave without rebuilding the OS?
user avatar
0 votes
0 answers
38 views

How can I stop the system changing name extensions of my files?

I have a created an executable Perl script, starting with #!/usr/bin/perl and have called it t. So when I launch ./t on the Terminal the script is executed and everything is fine. But apparently ...
user avatar
  • 192
2 votes
1 answer
407 views

Perl library locations, and System Integrity Protection

My system perl seems to have a bunch of cruft left over from previous installations: % which perl /usr/bin/perl % perl -V | perl -ne 'print if /INC/...//' @INC: /Library/Perl/5.18/darwin-...
user avatar
  • 1,184
2 votes
0 answers
746 views

Is there a Terminal command to verify macOS screensharing?

Is there a terminal command to determine if a screensharing session from a remote machine is not just initiated but also actively being viewed? Details: I have a background (Perl) process running on ...
user avatar
0 votes
1 answer
734 views

SH script calls Perl script. Works when I double click, but Perl script fails when I call from terminal

Severe newb here. I have a shell script that simply calls a perl script to create a file. It works if I double-click the SH file, but fails if I call the file in a terminal. here is the entire SH ...
user avatar
2 votes
2 answers
7k views

Perl RegEx in Mac terminal: grep -p "^([^\t]*\t){2}mypattern\t" textfile.txt doesn't work

I am a beginner of using programming commands. Why {2} is not functional after ([^\t]*\t) in macOS terminal? Is there any website providing Perl RegEx which works in mac? Thanks!
user avatar
0 votes
1 answer
252 views

Proper shebang line for running perl script with an AppleScript on a perlbrew install?

I have the following simple AppleScript which calls a perl script I wrote to clean the desktop: do shell script "/Users/stevied/bin/clean_desktop.pl" The script works fine when run from the command ...
user avatar
  • 1,256
0 votes
1 answer
45 views

Did I just mess up system Perl?

I am currently setting up a backup script on a macOS Sierra machine. In the logs some warnings related to the tool appeared, so I looked them up. Seems like this is caused by a missing Lchown Perl ...
user avatar
  • 323
2 votes
3 answers
2k views

Crypt-SSLeay on a macbook

I'm trying to install Crypt-SSLeay on a macbook and it failed. I manually downloaded Crypt-SSLeay from cpan and issued: perl Makefile.pl The error is openssl-version.c:2:10: fatal error: 'openssl/...
user avatar
1 vote
2 answers
686 views

How to pass an AppleScript variable to Perl script?

I have a Perl script that does some text transformation on a given file. Now I would like to call this script from an AppleScript which in turn I could execute from the script menu in order to run ...
user avatar
  • 696
2 votes
1 answer
429 views

How to install Monkeysphere on OSX El Capitan

I tried to install Monkeysphere via Homebrew but it complains of an unmet dependency. monkeysphere: Unsatisfied dependency: Crypt::OpenSSL::Bignum Homebrew does not provide Perl dependencies; install ...
user avatar
  • 1,614
0 votes
1 answer
104 views

How to control where script run by cron saves files?

I've got the following cron job that runs at 6 am every morning: 00 6 * * * /Users/username/path/to/script/wget.pl 1; The script, written in perl, fetches the latest files from a website. Within ...
user avatar
  • 1,256
0 votes
1 answer
1k views

Running mod_perl on El capitan

I'm trying to run mod_perl on El capitan. Process Following http://blog.n42designs.com/blog/2014/10/23/compiling-mod-perl-for-apache-2-dot-4-on-os-x-10-dot-10-yosemite/ an https://stackoverflow.com/...
user avatar
  • 5,454
0 votes
1 answer
736 views

Is El Capitan preventing me from getting the Perl module DBD::Oracle working?

Let me start by saying I'm not traditionally a Mac user. I'm still trying to transition from Gentoo, where compiling everything from source was the default state, and the system wasn't actively ...
user avatar
  • 153
5 votes
1 answer
1k views

El Capitan SIP and CPAN

As we know, Apple introduced it's new "rootless" feature in El Capitan that greatly restricts what the root user is capable of doing. Unfortunately this feature breaks CPAN for Perl users. One can ...
user avatar
1 vote
1 answer
2k views

openpgp2ssh (monkeysphere tool) installed with Homebrew on OS X error Can't locate Crypt/OpenSSL/Bignum.pm in @INC

I am trying to install monkeysphere on an OS X machine with Homebrew: $ brew install monkeysphere monkeysphere: Unsatisfied dependency: Crypt::OpenSSL::Bignum Homebrew does not provide Perl ...
user avatar
0 votes
1 answer
992 views

Trying to Install WWW:Mechanize and Getting Localhost Error

Okay . . . I've been trying to install WWW::Mechanize through CPAN and it always chokes at this line: t/local/back.t ........... 1/47 Error GETing http://localhost:60603/: Can't connect to localhost:...
user avatar
  • 115
0 votes
1 answer
237 views

Changing ownership of .cpan

I'm getting back into Perl; several months ago I had to have a new hard drive installed and so had to start over again. When I try to update CPAN, I get this message: Your configuration suggests that ...
user avatar
  • 115
1 vote
1 answer
191 views

To exclude bak files in Finder's search?

I create bak files after every Perl operation. How can you exclude all bak files in your Finder's search?
user avatar
3 votes
1 answer
999 views

Problem installing Devel::REPL using cpanm

I tried following the instructions for installing CPAN modules at this link: http://www.cpan.org/modules/INSTALL.html However, when I try to install Devel::REPL, it fails. Here is the log: [user@...
user avatar
1 vote
1 answer
224 views

What is wrong in this Perl regex in OSX?

The code works in Ubuntu, but not in OSX. I run perl -000pe 's/\n/\n\\begin{enumerate}\n/; s/\n\d./\n\\item /g; s/$/\\end{enumerate}\n/' lorem.tex I get -bash: $: command not found MacBook-Air:...
user avatar
4 votes
1 answer
819 views

Find and replace with grep and perl

I'd like to grep and replace specific text in textfiles within a directory and all subdirs. I try the following: ls -R | egrep '.*\.txt' | perl -i -p -e 's/one.a/two.a/g' Although grep spits out a ...
user avatar
  • 323
1 vote
1 answer
73 views

Invoke Perl script in Windows from OS X

I have a Perl script written in Windows and an AppleScript written in OS X. I want the AppleScript to invoke the Perl script that is residing in Windows. How can I do this?
user avatar
2 votes
2 answers
3k views

automator to run AppleScript for a shell script

For a selected file in Finder, I like to run a perl script using Services. I created an Automator process that runs an AppleScript: on run {input, parameters} tell application "Terminal" ...
user avatar
  • 581
1 vote
1 answer
531 views

Does Apache require special settings to run a command?

I am trying to create an image using Bio::Perl/Bio::Graphics and implement it on my webserver. However, whenever I am trying to run my scripts online, the command line does not respond to run my ...
user avatar
  • 921
0 votes
1 answer
3k views

How to install modules from CPAN without sudo?

Is there a way to install modules from CPAN without resorting to sudo? (And without perlbrew, please.)
user avatar
  • 950
2 votes
1 answer
126 views

How to implement this script on a Mac

I just read Matt Might's blog post on eliminating filler and "weasels" from my writing, and I am wondering how I would implement this on Latex to run and check my document? I know I should use ...
user avatar
  • 117
1 vote
2 answers
916 views

MacOSX 10.8 and 32-bit perl modules

I just upgraded from MacOSX 10.6 to 10.8. Many of my projects depend on Mac::Glue, Mac::Carbon and their ilk. Even though Mac::Glue comes bundled with MacOSX 10.8 perl, it doesn't seem to work: [kw|...
user avatar
0 votes
2 answers
783 views

Using gwhois on OSX

How does one install gwhois on a Mac? I'm already up and running with Homebrew; I assume that there's some magic perl configuration required before it will run. I've tried the following: brew ...
user avatar
  • 113
17 votes
2 answers
24k views

How to install CPAN modules from the command line on OS X?

Simple question: How to install CPAN modules on OS-X like normal Linux/Unix way? I just want to type in cpan something like install Perl6::Say for example.
user avatar
8 votes
2 answers
10k views

How to reinstall Mac OS X built in Perl on Mountain Lion?

I updated to Mountain Lion 4 days ago and then realised that my perl scripts did not work any longer. So I installed ActivePerl 5.14 (newest version) because I thought that perl has been deleted. ...
user avatar
3 votes
3 answers
6k views

Getting Perl DBD::mysql working on OS X 10.7?

I can't seem to get Perl & MySQL to talk to each other on OS X 10.7 Lion. I did all the installs by the book, I used Oracle's PKG installer for the latest MySQL Community Server, and I installed ...
user avatar
  • 186
2 votes
1 answer
1k views

What is Lion's version of Perl 5?

What version of Perl 5 is OS X Lion shipping with?
user avatar