Help - Search - Members - Calendar
Full Version: Perl And Path
OESF Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > C1000/3x00 General discussions
laur
I am starting to work with perl on my C1000 is there a way to add Perl to the Path Variable?
If So How and where do I find the file to add it and of course what do I add?
datajerk
Edit ~/.bashrc, add export PATH=$PATH:/path_perl
laur
QUOTE(datajerk @ Mar 7 2006, 12:38 PM)
Edit ~/.bashrc, add export PATH=$PATH:/path_perl
*


Alright, I am new to this, what is '~/' - is that my home directory?
I did a search for .bashrc and could not find the file - I found the .profile file and that has a Path variable in it - should I change that?

Thanks,
(I hated having to always enter the entire thing ) wink.gif
Meanie
QUOTE(laur @ Mar 8 2006, 06:35 AM)
QUOTE(datajerk @ Mar 7 2006, 12:38 PM)
Edit ~/.bashrc, add export PATH=$PATH:/path_perl
*


Alright, I am new to this, what is '~/' - is that my home directory?
I did a search for .bashrc and could not find the file - I found the .profile file and that has a Path variable in it - should I change that?

Thanks,
(I hated having to always enter the entire thing ) wink.gif
*



The ~ is substituted with the value of $HOME in most shells so instead of eg providing /home/zaurus all the time, you can just specify ~

Most shells have their own rc script file, but they also usually default to .profile as well if their own rc file does not exist, so in case of bash, it will look for ~/.bashrc first, then ~/.profile

As a side, why do you need to specify the path to perl? perl usually installs to /usr/bin/perl or /usr/local/bin/perl or at least is symlinked to those locations and those should be in the default path anyway. besides, don't you specify the perl header in your perl scripts? if you do that you can just execute the script directly and it will find perl by itself.

eg:
CODE
#!/usr/local/bin/perl -w
print("Hi, this is a perl script,\n");
laur
QUOTE(Meanie @ Mar 7 2006, 06:07 PM)
The ~ is substituted with the value of $HOME in most shells so instead of eg providing /home/zaurus all the time, you can just specify ~

Most shells have their own rc script file, but they also usually default to .profile as well if their own rc file does not exist, so in case of bash, it will look for ~/.bashrc first, then ~/.profile

As a side, why do you need to specify the path to perl? perl usually installs to /usr/bin/perl or /usr/local/bin/perl or at least is symlinked to those locations and those should be in the default path anyway. besides, don't you specify the perl header in your perl scripts? if you do that you can just execute the script directly and it will find perl by itself.

eg:
CODE
#!/usr/local/bin/perl -w
print("Hi, this is a perl script,\n");

*


I am new to perl too blink.gif
I am trying to learn perl (as well as the Linux/Zaurus OS) by writing a script to back up my documents directory to my CF card.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2015 Invision Power Services, Inc.