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. Advertisements

  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. Advertisements

  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. Advertisements

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. S. Justin Gengo
    Replies:
    2
    Views:
    521
    S. Justin Gengo
    Aug 20, 2003
  2. Benjamin Rutt
    Replies:
    2
    Views:
    1,108
    Peter Hansen
    Dec 20, 2005
  3. Jukka K. Korpela
    Replies:
    1
    Views:
    1,256
    Jonathan N. Little
    Sep 12, 2006
  4. chris
    Replies:
    0
    Views:
    402
    chris
    Oct 13, 2006
  5. Christopher Brewster
    Replies:
    5
    Views:
    613
    John Machin
    Nov 14, 2008
  6. Mirovk
    Replies:
    5
    Views:
    315
    Mirovk
    Aug 22, 2006
  7. Replies:
    2
    Views:
    300
    Sean O'Halpin
    Dec 17, 2008
  8. UKuser

    Same script - different setting?

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