Perl - bad interpreter: No such file or directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl - bad interpreter: No such file or directory
# 1  
Old 02-10-2010
Perl - bad interpreter: No such file or directory

Here is a puzzler.

To start, let me say that I've done a search on this issue and it is definitely not related to line endings being encoded in windows returns.

I get this error when I run SOME perl scripts. I have a script called hello_world.pl. I do $cp hello_world.pl new_hello_world.pl and run new_hello_world.pl I get the error but not on the original hello_world.pl.

I've restarted the box to no effect.

If I edit hello_world.pl and make changes... no problem.. runs just fine.

I'm on a Mac with Snow Leopard using macports version of perl but I don't see how that could matter considering I'm copying a working script. Permissions and line endings are, of course, the same.

I did a port update outdated a while ago but I don't think that explains the issue.

Any pointers would be grand.

---------- Post updated at 05:14 PM ---------- Previous update was at 03:37 PM ----------

eh... must have been a screwy perl install I deleted it and reinstalled perl and it seems to work now.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

-bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory

I keep getting this error and I am not sure why. -bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory First I run my makefile and this works fine: goodmain: main.o gcc -o goodmain main.o main.o: main.c gcc -c main.c Then I want to limit my output so I... (11 Replies)
Discussion started by: cokedude
11 Replies

2. UNIX for Advanced & Expert Users

Sqlite3: /lib/ld-Linux.so.2: bad ELF interpreter:

Hi all I'm hoping this is just me being a muppet, has anyone come across this problem before? I am writing an application that uses sqlite3 and I have created a database using it - sqlite3 muse.db SQLite version 3.6.20 Enter ".help" for instructions Enter SQL statements terminated with... (2 Replies)
Discussion started by: steadyonabix
2 Replies

3. Red Hat

Not able to run any command /lib64/ld-Linux-x86-64.so.2: bad ELF interpreter

Hi, I accidentally did this: wadhwaso@nxsdgd01 deps]$sudo rpm -e --nodeps glibc-2.5-107.x86_64 error: %postun(glibc-2.5-107.x86_64) scriptlet failed, exit status 255 and since then I am not able to run any command on this server except 'cd'. I always get the following error: $ ls... (6 Replies)
Discussion started by: stunn3r
6 Replies

4. Shell Programming and Scripting

Bad Interpreter

Hi. My name is Caleb (a.k.a RagingNinja) form the whited00r forums. (Whited00r makes custom firmware for iOS devices). I have been learning and creating simple shells scripts. I have been recently using VIM for Windows or using VirtualBox to run the UBUNTU OS within VirtualBox to create my shell... (2 Replies)
Discussion started by: RagingNinja
2 Replies

5. Shell Programming and Scripting

bad interpreter when running script

Hi All, I'm not confortable in writing script, can someone can help me, when I run that script below i found this error code : -bash: ./script.sh: /bin/sh.: bad interpreter: Here is the script for i in * x=${i##*.} z=$(perl -e 'print time;') t=$(echo $z-$x|bc)... (12 Replies)
Discussion started by: bzb23
12 Replies

6. Shell Programming and Scripting

bad interpreter: Permission denied

Hi I am running a script: #!bin/bash set -x echo"select * from celldatamap;" || sqlcsv -v -h -s ',' -d MTNSA11G -u datasafe -p datasafe > andrea.csv When I run my script ./tablescript.sh I get the following error: $ ./tablescript.sh (3 Replies)
Discussion started by: ladyAnne
3 Replies

7. Shell Programming and Scripting

Executing expect script giving message as bad interpreter: Permission denied

Hi Gurus, I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as #!/usr/bin/expect-5.43 -f spawn telnet localhost 2233 expect "password:" send "secret\r" send "i data.cnbc.com\r" send "exit\r" expect eof When I am trying to execute... (2 Replies)
Discussion started by: niks_yv
2 Replies

8. Ubuntu

How to resolve bad interpreter error

Hi, Iam trying to run a gmake command and have the latest version of Gnu in my redhat linux system. I need to execute the following steps; ---> chmod +x utils/* ---> ./utils/AllCodeManagerFix ---> gmake LINUX Iam able to do the chmod command but when I run the second command I get... (2 Replies)
Discussion started by: viji19812001
2 Replies

9. UNIX for Dummies Questions & Answers

bad interpreter: Permission denied

I am writing an expect script but am getting a bad interpreter: permission denied error. I don't think the error has anything to do with expect itself, I think I am missing something in how I start the file. For instance, when I run the file under the expect directory it works: cd... (7 Replies)
Discussion started by: earnstaf
7 Replies

10. Shell Programming and Scripting

/bin/sh: bad interpreter: Permission denied

today i started the LFS book (version 4.0). Basically i am using slackware 9.0 to try and install a new linux completely from source on another partition. Now i took the book's recommendations and created a user called lfs so i wouldn't have to do the stuff as root, and i have got the new LFS... (4 Replies)
Discussion started by: Calum
4 Replies
Login or Register to Ask a Question
Test::EOL(3pm)						User Contributed Perl Documentation					    Test::EOL(3pm)

NAME
Test::EOL - Check the correct line endings in your project SYNOPSIS
"Test::EOL" lets you check for the presence of trailing whitespace and/or windows line endings in your perl code. It reports its results in standard "Test::Simple" fashion: use Test::EOL tests => 1; eol_unix_ok( 'lib/Module.pm', 'Module is ^M free'); and to add checks for trailing whitespace: use Test::EOL tests => 1; eol_unix_ok( 'lib/Module.pm', 'Module is ^M and trailing whitespace free', { trailing_whitespace => 1 }); Module authors can include the following in a t/eol.t and have "Test::EOL" automatically find and check all perl files in a module distribution: use Test::EOL; all_perl_files_ok(); or use Test::EOL; all_perl_files_ok( @mydirs ); and if authors would like to check for trailing whitespace: use Test::EOL; all_perl_files_ok({ trailing_whitespace => 1 }); or use Test::EOL; all_perl_files_ok({ trailing_whitespace => 1 }, @mydirs ); DESCRIPTION
This module scans your project/distribution for any perl files (scripts, modules, etc) for the presence of windows line endings. FUNCTIONS
all_perl_files_ok all_perl_files_ok( [ \%options ], [ @directories ] ) Applies "eol_unix_ok()" to all perl files found in @directories (and sub directories). If no <@directories> is given, the starting point is one level above the current running script, that should cover all the files of a typical CPAN distribution. A perl file is *.pl or *.pm or *.t or a file starting with "#!...perl" Valid "\%options" currently are: o trailing_whitespace By default Test::EOL only looks for Windows (CR/LF) line-endings. Set this to true to raise errors if any kind of trailing whitespace is present in the file. o all_reasons Normally Test::EOL reports only the first error in every file (given that a text file originated on Windows will fail every single line). Set this a true value to register a test failure for every line with an error. If the test plan is defined: use Test::EOL tests => 3; all_perl_files_ok(); the total number of files tested must be specified. eol_unix_ok eol_unix_ok ( $file [, $text] [, \%options ] ) Run a unix EOL check on $file. For a module, the path (lib/My/Module.pm) or the name (My::Module) can be both used. $text is the diagnostic label emited after the "ok"/"not ok" TAP output. "\%options" takes the same values as described in "all_perl_files_ok". EXPORT
A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module. ACKNOWLEDGEMENTS
Shamelessly ripped off from Test::NoTabs. SEE ALSO
Test::More, Test::Pod. Test::Distribution, <Test:NoWarnings>, Test::NoTabs, Module::Install::AuthorTests. AUTHORS
o Arthur Axel 'fREW' Schmidt <frioux@gmail.com> o Florian Ragwitz <rafl@debian.org> o Kent Fredric <kentfredric@gmail.com> o Peter Rabbitson <ribasushi@cpan.org> o Tomas Doran <bobtfish@bobtfish.net> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Tomas Doran. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-15 Test::EOL(3pm)