Of course, you could write the whole script in perl, but...baby steps.
Note that the variable(s) must be exported. I used "typeset -x" instead of "export" since I regularly typeset all the variables used in scripts. It's a good habit to adopt, since variables can be inherited if they are not typeset.
Wanna see all your scripts blow up? Try "typeset -r i" at the prompt before running them and watch what happens! This makes "$i" read only...unless the script typesets it.
and then reading $MY_VARIABLE in perl program. I didnt get any value!
I tried as command line argument, however since I already have one file as input paramenter, it is interpreting another also as file input and I get a message that $MY_VARIABLE file does not exists.
Can you please show me syntax of passing file as one parameter and value as another parameter? or any other way?