Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop mac malware memory monitor motherboard music network printer problem ram registry router server slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Perl in Linux Problem

Reply  
Thread Tools
diamondnular's Avatar
Member with 45 posts.
 
Join Date: Apr 2004
Location: Providence, RI
12-Aug-2004, 06:25 PM #1
Perl in Linux Problem
Hi all,

I am just a beginner using Perl. I am doing one program, which is rather long so I think I should not post all of it here. The problem I have now is the first command in the program: #! /usr/bin/perl -w

I almost finished the program, and I tried it on Cigwin or Perl for Window. It runs fine. But when I try to run it in a "real" Linux, if the first line is "#! /usr/bin/perl -w" it runs well (with a lot of warnings, of course), but if the first line is "#! /usr/bin/perl", it always warns the ": bad interpreter: No such file or directory". I don't understand the problem. In order to temporarily solve, I try "#! /usr/bin/perl -w" with the command "no warnings;" in side the program.

So anybody has met the same situation or has any suggestion to me? In Linux, I am using Perl 5.6.1 built for i686-Linux. In Cygwin I am using Perl 5.8.2, and in Window, Perl 5.8.4.

Thank you.
__________________
Diamondnular
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
12-Aug-2004, 08:16 PM #2
If the program is not too big could you post it here. Either put it in between the Code tags or upload it as a text file.
diamondnular's Avatar
Member with 45 posts.
 
Join Date: Apr 2004
Location: Providence, RI
13-Aug-2004, 12:47 AM #3
Hi LwdSquashman,

Yes, sure. I uploaded the program (s.pl) in txt file (s.txt) and the input file is a.txt. Thank you in advance.
Attached Files
File Type: txt s.txt (23.8 KB, 71 views)
File Type: txt a.txt (96 Bytes, 65 views)
5mi11er's Avatar
Senior Member with 521 posts.
 
Join Date: Aug 2004
Experience: Networking Professional
19-Aug-2004, 12:23 PM #4
When you say "real linux", are you moving the program from one machine to another? It's possible that the "real linux" machine has perl installed somewhere else other than in /usr/bin/perl, but I don't know why it would work with a -w in that case...
diamondnular's Avatar
Member with 45 posts.
 
Join Date: Apr 2004
Location: Providence, RI
19-Aug-2004, 12:30 PM #5
Yes, it is. But it is not a big deal. The path /usr/bin/perl should be /usr/local/bin/perl. I tried it, but it still has the same problem. Besides, I tried many other programs with the path /usr/bin/perl or /usr/local/bin/perl without -w, they work fine! Thanks anyway.
__________________
Diamondnular
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:16 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.