Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: perl can't find my script on ubuntu

by RedElk (Hermit)
on Dec 14, 2010 at 21:48 UTC ( #877171=note: print w/ replies, xml ) Need Help??


in reply to perl can't find my script on ubuntu

Like the previous post commented, you may not be at the right directory. For example, may be missing a preceeding '/' such as... perl /begperl/newline.pl.

I encountered this problem often and anymore CD to the required directory before running anything.


Comment on Re: perl can't find my script on ubuntu
Re^2: perl can't find my script on ubuntu
by Samurai Monkey (Novice) on Dec 15, 2010 at 01:03 UTC
    RedElk, thank you for your response. I've been trying to figure out how to change the directory from my home directory to the directory that I want to work off of such as the begperl directory in the Ubuntu terminal. You said you used to encounter this same problem before, but not any more because you changed the directory? How did you do so in the Ubuntu terminal?

      Roboticus touched on it in his post. The change directory command is cd. However, before I use cd I start with the list command ls. This allows me to see everything in my home directory. From there, I cd into the needed directory. I may alternate these commands two or three times depending upon what level I need to get to. Admittedly, I prefer visual queues. Your stylings may vary

      That being said, I'm always starting from my Ubuntu home directory. I would assume this is the case for you as well. But to check this, you can use the working directory command pwd. If you're not at your home directory use the cd command followed by nothing to navigate there.I've found this command line reference helpful.

      I still think that you need a '/' at the beginning of the line when you intend to navigate multiple directories on the command line such as when you try to run your newline.pl script.

      perl /begperl/newline.pl ^

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://877171]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2014-09-16 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (46 votes), past polls