Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6971443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:50:27+00:00 2026-05-27T16:50:27+00:00

I was sent a perl script over mail and asked to run it .I

  • 0

I was sent a perl script over mail and asked to run it .I placed it on my local drive as is but when I tried to run the script it shows me

/usr/bin/perl^M: bad interpreter: No such file or directory

I checked and usr/bin/ does have perl in there .I am not sure what is wrong.I checked a bit and looks like I am missing some spaces or something ..I tried adding those at the end of
usr/bin/perl and at the end of the file but that didnt help either.
I even tried to use dos2unix

dos2unix oldfile newfile

‘dos2unix’ not found.This is on MacOSX.
Might I also mention that I am sshing into my mac using my windows machine at home.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:50:27+00:00Added an answer on May 27, 2026 at 4:50 pm

    In the absence of dos2unix, you can use tr (on Mac OS X) to strip the DOS / Windows new-lines:

    tr -d '\r' < old.pl > new.pl
    

    This will solve the “bad interpreter” issue.

    “Can’t locate Gpu.pm in @INC” is a different issue. Either you don’t have Gpu.pm installed on your Mac (or whichever computer on which you are running this, I’m confused by your comments) or it’s not in your include path. I don’t who what that script is or what it does. A quick look on http://search.cpan.org/ revealed nothing.

    If you can get that Perl module (presumably from whoever supplied oldfile), you’ll have to ensure it is in @INC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#!/usr/bin/perl use WWW::Mechanize; use Compress::Zlib; my $mech = WWW::Mechanize->new(); my $username = ; #fill
I have the code: #!/usr/bin/perl use strict; use WWW::Mechanize; my $url = 'http://divxsubtitles.net/page_subtitleinformation.php?ID=111292'; my
I am using the Perl Win32::SerialPort module. In this paticular module I sent over
I sent Scores Activity to doinbackground then run a function on Scores Activity but
The request I sent is accept gzip but the response is not compressed, instead,
I'm writing a perl script that mimics gcc. This my script needs to process
I'm working on a Perl script which is called from a server side include
In my Perl/CGI web application, I sometimes need to run a long process which
I use Catalyst (MVC framework for Perl), but the question probably apply to all
I am very newbie to Perl. I wrote a very simple Perl program (script):

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.