Craig Sharp wrote: > Hi all, > > In a shell programming, I can run a script with a period-space in front of the >script: > > Eg: . script_name.scr > > This will cause the variables to be sourced to the parent process. In other words, >any variables that are created within the child process running the script become >available to the parent process when the child process completes. Without the >period, the variables die with the child process.
Not from my understanding. The '.' causes the file to sourced, thus setting some vrbls in the sourcing shell (not the parent of the shell). Those vrbls would be avail to any chidren created after that point by the shell. > If I use the system command: > > Eg: system ". script_name.scr" > > Will the variables be available to the perl script that called the system command? No, they would be sourced by any shell that was spawned (if that syntax were allowed), but would not make it back to the Perl script that did the system call. A more likely version would be 'system "/path/to/some/shell -c . script_name.scr"'. Further answered by Jenda. -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs