User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Perl section within the Software Development category of DaniWeb, a massive community of 425,972 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,677 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Perl advertiser: Programming Forums
Views: 675 | Replies: 2 | Solved
Reply
Join Date: Jan 2008
Posts: 33
Reputation: rysin is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rysin's Avatar
rysin rysin is offline Offline
Light Poster

Perl problem

  #1  
Mar 27th, 2008
Hey guys. Ive got a problem with a simple hello world script. Im a perl beginner so bear with me. Im running mandriva linux if it matters. Also this file is saved under /home/rysin/documents.

Code
#!/usr/bin/perl

print "Hello World\n";


When I go into the command line and use the perl hello.pl command it comes up with this error message.

No such file or directory

ANy idea why?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation: phper is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 11
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: Perl problem

  #2  
Apr 2nd, 2008
Have you checked if perl is installed on your system?

Open up a terminal/shell and type:


This should give you something like:

This is perl, v5.8.8 built for i586-linux-thread-multi

licensing information, etc.
If you find my post useful please add to my reputation!! Thanks!

ajtrichards web solutions
http://www.ajtrichards.co.uk
Reply With Quote  
Join Date: Apr 2008
Posts: 2
Reputation: Uninverted is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Uninverted Uninverted is offline Offline
Newbie Poster

Re: Perl problem

  #3  
Apr 22nd, 2008
Make the file executable first; usually 'chmod +x' will work. And make sure to type ./hello.pl, because otherwise it looks in /bin and /usr/bin, and not the current directory
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Perl Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Perl Forum

All times are GMT -4. The time now is 11:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC