setting of session values from a script for the same session in which it is running

Discussion in 'Perl Misc' started by King_Kong, May 23, 2005.

  1. King_Kong

    King_Kong Guest

    Can somebody help me with the following problem..i am stuck at a
    point........
    i want to execute shell commands from a perl script..
    which r dynamic in nature...
    one set of commands set the environment for the succeeding commands.
    but the prob is the environment set is not in the same session as the
    next command .. so my next set of commands fail

    how do i set the session(or run the commands in the same session in
    which the script it self is running)...

    eg.

    $ perl a.pl (in a.pl we have 2 sets of commands 'setenviroment` and
    'take action')
    this must be equivlent to=>
    $setenvironment
    $perl a.pl

    but the trick is the setenvironment function chages dynamically reading
    from a file.

    prompt suggestions r requested..
    King_Kong, May 23, 2005
    #1
    1. Advertising

  2. Re: setting of session values from a script for the same sessionin which it is running

    King_Kong wrote:

    [ snip FAQ: "I {changed directory, modified my environment} in a perl
    script. How come the change disappeared when I exited the script? How
    do I get my changes to be visible?" ]

    > prompt suggestions r requested..


    I suggest you promptly consult the FAQ.
    Brian McCauley, May 23, 2005
    #2
    1. Advertising

  3. Re: setting of session values from a script for the same sessionin which it is running

    King_Kong wrote:
    > Can somebody help me with the following problem..i am stuck at a
    > point........


    <snip>

    > prompt suggestions r requested..


    Really?

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
    Gunnar Hjalmarsson, May 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jukka K. Korpela
    Replies:
    1
    Views:
    1,123
    Jonathan N. Little
    Sep 12, 2006
  2. Christopher Brewster
    Replies:
    5
    Views:
    340
    John Machin
    Nov 14, 2008
  3. Mirovk
    Replies:
    5
    Views:
    234
    Mirovk
    Aug 22, 2006
  4. Replies:
    2
    Views:
    148
    Sean O'Halpin
    Dec 17, 2008
  5. UKuser

    Same script - different setting?

    UKuser, Feb 15, 2008, in forum: Javascript
    Replies:
    1
    Views:
    84
    UKuser
    Feb 15, 2008
Loading...

Share This Page