$variable passing

Posted on 2009-05-10
Last Modified: 2012-05-06
Sorry, it's probably a simple, straight forward question, but one i haven't found the answer to yet.

I'm basically trying to pass six variables created from one script "", to another program "". I'd assume it'd be a similar method to passing a variable to a subroutine? if it is at all possible?

Thanks in advance.
Question by:StephenMcGowan
  • 3
  • 3
LVL 48

Expert Comment

ID: 24350166
How are you calling

LVL 84

Expert Comment

ID: 24350189
Do you get to write
If not, how does it currently like to receive variables?

Author Comment

ID: 24350212
Hi ozo,

Yeah basically what i'm doing is from the programme i wrote before with the longest dna sequences ($longorf1, $longorf2 etc etc), i'm now trying to pass these to a script "" which will then call a sub-routine and convert them from dna to protein sequence before doing some more stuff to the sequences.

If i can't transfer the variables from one script to another i should be ok with creating a sub-routine to carry out the same function. Just not sure if -> is possible or not?
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

LVL 84

Accepted Solution

ozo earned 50 total points
ID: 24350228
if starts with

then you can call
system '', $var1,$var2,$var3,$var4,$var5,$var6;

Author Comment

ID: 24350294
ok, so at the very end of i've put:

system '', $longorf1,$longorf2,$longorf3,$longorf4,$longorf5,$longorf6;

and for

# Initialise variables


but receive the error message:

Can't exec "": No such file or directory at line 77.

is there a way of telling it to automatically look in the same directory, if both scripts are in the same directory?
LVL 84

Expert Comment

ID: 24350311
if is in the current working directory.
how was invoked?

Author Comment

ID: 24350333
Thanks ozo,

It's worked a charm.. I had it as ./''; with ./ outside the quotations.

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question