- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- PERL: how can i source HP-UX Env Variables in a pe...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 01:49 AM
тАО12-03-2002 01:49 AM
PERL: how can i source HP-UX Env Variables in a perl skript?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 02:38 AM
тАО12-03-2002 02:38 AM
Re: PERL: how can i source HP-UX Env Variables in a perl skript?
See if you can see the env like this
#!/usr/contrib/bin/perl
foreach $key (keys %ENV){
print qq|The value of $key is $ENV{"$key"}\n|;
}
Regards
Steve Steel
Quote of the moment
-------------------
"We are drowning in information but starved for knowledge."
-- John Naisbitt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 03:02 AM
тАО12-03-2002 03:02 AM
Re: PERL: how can i source HP-UX Env Variables in a perl skript?
$ENV{ORACLE_SID} = "test";
system 'echo $ORACLE_SID'; # prints "testdb"
{ local $ENV{ORACLE_SID} = "production";
system 'echo $ORACLE_SID'; # prints "production"
}
system 'echo $ORACLE_SID'; # prints "testdb"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 04:36 AM
тАО12-03-2002 04:36 AM
Re: PERL: how can i source HP-UX Env Variables in a perl skript?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 05:13 AM
тАО12-03-2002 05:13 AM
Re: PERL: how can i source HP-UX Env Variables in a perl skript?
while (
chomp;
my ($var, $val) = split /=/ $_, 2;
$ENV{$var} = $val;
no strict 'refs';
$$var = $val;
}
close ENV or die "ORACLE_ENV: $!";