LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-05-2010, 03:13 AM   #1
vjayraghavan
LQ Newbie
 
Registered: Feb 2009
Posts: 15
Blog Entries: 1

Rep: Reputation: 0
Not able to invoke variable values


Hi,

I am trying to import variable values from a profile file to a perl program.
I am using the below command for doing it.

Quote:
system (". /opt/bbfb/bin/setbbfbenv $codeset");
the above command does make variable values available to the running perl program..
Can some one help me on this front..
Thanks in advance..
 
Old 05-05-2010, 03:22 AM   #2
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
system() starts a subshell

You can use %ENV of perl by setting the corresponding key in hash
say
Code:
$ENV{SS_PATH}='somevalue'
or
declare all these variables in another perl file.
and use that file in perl script,

Look for perl use or require

Last edited by PMP; 05-05-2010 at 03:33 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fork(), variable values between child and parent process???? dearvivekkumar Programming 6 02-24-2010 06:18 AM
Values like VARIABLE[i] ? BlueSpirit Programming 5 04-27-2007 02:35 PM
How to share variable values between shell and awk? realos Programming 1 12-16-2006 11:15 PM
BASH Script: variable values referencing for console arguments sadarax Programming 1 11-14-2005 06:23 PM
bash - comparing a variable to several values davee Programming 3 05-05-2003 08:26 AM


All times are GMT -5. The time now is 01:53 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration