Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to make perl set the variable for the parent telnet session?#!/usr/bin/perl -w # /usr/local/bin/gethost.pl # Find out where I'm calling from open(WHOPROC, "who -m|"); # open who for reading $whoami = <WHOPROC>; close (WHOPROC); # print "$whoami"; ($name,$port,$month,$day,$time,$host) = split(/\s+/, $whoami); chop $host; $grab = substr($host, 1,); #print "$grab\n"; # Now set the display variable $display = $grab . ':0.0'; # print "$display\n"; system "sh export DISPLAY='$display'";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setting enviornment variables for parent process
by chromatic (Archbishop) on Feb 09, 2000 at 23:38 UTC | |
|
RE: setting enviornment variables for parent process
by setantae (Scribe) on Feb 09, 2000 at 07:58 UTC | |
|
Re: setting enviornment variables for parent process
by jamieamieamily (Initiate) on Feb 09, 2000 at 17:58 UTC | |
by Anonymous Monk on Feb 09, 2000 at 21:03 UTC | |
by Anonymous Monk on Feb 10, 2000 at 04:20 UTC |