•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Perl section within the Software Development category of DaniWeb, a massive community of 391,659 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,797 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Perl advertiser:
Views: 3492 | Replies: 3
![]() |
•
•
Join Date: Jan 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Hello I was wondering if there is a way to read a unix profile'd variable while inside my PERL code?
I'm trying to do something like this.
[code]
system( " execute some code >> $UNIXVAR\log");
also tried
system( " execute some code >> '$UNIXVAR\log'");
[\code]
I think though that the way I'm executing my application that I'm losing my profile's exported varibles.
I'm executing my app like this
./perlapp.pl
This is on an AIX Unix environment if this helps anyone.
I'm trying to do something like this.
[code]
system( " execute some code >> $UNIXVAR\log");
also tried
system( " execute some code >> '$UNIXVAR\log'");
[\code]
I think though that the way I'm executing my application that I'm losing my profile's exported varibles.
I'm executing my app like this
./perlapp.pl
This is on an AIX Unix environment if this helps anyone.
$ENV{UNIXVAR} Last edited by masijade : Feb 26th, 2007 at 9:22 am. Reason: formatting
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Jan 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Thanks for the quick reply, but that's not quite what I need.
I wasn't quite clear enough.
So for example say I export a path to a variable name then my perl script I want to access that path that is stored in the variable is there a way to access that?
From what I see from the $ENV variable options it holds a lot of information the system and unix environment but I do not see any profile/user variables in the list.
I wasn't quite clear enough.
So for example say I export a path to a variable name then my perl script I want to access that path that is stored in the variable is there a way to access that?
From what I see from the $ENV variable options it holds a lot of information the system and unix environment but I do not see any profile/user variables in the list.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Perl Marketplace
- $foo == $bar ? (Geeks' Lounge)
- Perl MIME handler -> how to get the invoking filehandle? (Perl)
- i use perl (Perl)
- Your thoughts regarding Perl (Perl)
- Linux/UNIX (*nix Software)
Other Threads in the Perl Forum
- Previous Thread: Difference between tr and s
- Next Thread: How to skip a line !



Linear Mode