Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

$variable passing

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.
  • 3
  • 3
1 Solution
How are you calling

Do you get to write
If not, how does it currently like to receive variables?
StephenMcGowanAuthor Commented:
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?
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

if starts with

then you can call
system '', $var1,$var2,$var3,$var4,$var5,$var6;
StephenMcGowanAuthor Commented:
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?
if is in the current working directory.
how was invoked?
StephenMcGowanAuthor Commented:
Thanks ozo,

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now