LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2008, 10:02 AM   #1
pwd_pwd_omg_pwd
LQ Newbie
 
Registered: Oct 2008
Location: Cardiff, Wales
Distribution: Jaunty
Posts: 20

Rep: Reputation: 0
Question perl: need a few lines to change source directory within a bioinformatics program


I am working on a program (partigene) which, at one point looks for the files it needs, but unfortunately it looks for them in the wrong directory. I know that i could just move my files to where its looking or just change the source directory in the actual perl file but taking the easy way out isnt going to get me better at perl is it!
not really sure which operator(s) to use for the look up parts.
Any help would be much appreciated as ive got a bit stumped.
Thanks
 
Old 11-15-2008, 10:05 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by pwd_pwd_omg_pwd View Post
I am working on a program (partigene) which, at one point looks for the files it needs, but unfortunately it looks for them in the wrong directory. I know that i could just move my files to where its looking or just change the source directory in the actual perl file but taking the easy way out isnt going to get me better at perl is it!
not really sure which operator(s) to use for the look up parts.
Any help would be much appreciated as ive got a bit stumped.
Thanks
Please publish the code first (using the '#' above) - without the code bsdbuild/index.html.enit's hard to understand where/what the problem is.
 
Old 11-17-2008, 01:03 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
As above, showing the (relevant part of) the code would help.
If you pass the dir to use as a param, the main cmd you want is chdir : http://perldoc.perl.org/functions/chdir.html

Ps in addition to http://perldoc.perl.org/index.html, this is a good place to learn : http://www.perlmonks.org/?node=Tutorials

Last edited by chrism01; 11-18-2008 at 05:56 PM.
 
Old 11-18-2008, 04:17 AM   #4
pwd_pwd_omg_pwd
LQ Newbie
 
Registered: Oct 2008
Location: Cardiff, Wales
Distribution: Jaunty
Posts: 20

Original Poster
Rep: Reputation: 0
sorry about not putting up any code guys. wasnt in the lab that day and wanted to get a head start, but the boss man here has sorted me out now. but thanks for the quick repies anyway.
Dan
 
Old 11-18-2008, 05:57 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
Its usually considered polite to post the soln for the education of others
 
  


Reply

Tags
perl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NEED HELP IN comment lines PERL Perl script adam_blackice Programming 17 11-07-2007 08:01 AM
to change the directory using a perl script in linux kernel indu.a Linux - Kernel 3 11-15-2006 03:22 AM
LXer: Open Source Bioinformatics LXer Syndicated Linux News 0 05-10-2006 08:33 AM
Perl and drawing lines Veteq Programming 2 11-27-2004 07:16 AM
program knowing home directory (perl)? sk8guitar Programming 15 11-06-2003 09:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration