OESF Portables Forum
Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 General discussions => Topic started by: laur on March 07, 2006, 12:04:53 pm
-
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?
-
Edit ~/.bashrc, add export PATH=$PATH:/path_perl
-
Edit ~/.bashrc, add export PATH=$PATH:/path_perl
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117440\"][{POST_SNAPBACK}][/a][/div]
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 )
-
Edit ~/.bashrc, add export PATH=$PATH:/path_perl
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117440\"][{POST_SNAPBACK}][/a][/div]
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 )
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117447\"][{POST_SNAPBACK}][/a][/div]
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:
#!/usr/local/bin/perl -w
print("Hi, this is a perl script,\n");
-
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:
#!/usr/local/bin/perl -w
print("Hi, this is a perl script,\n");
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117483\"][{POST_SNAPBACK}][/a][/div]
I am new to perl too
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.