[clue] source'ing

Chris Fedde chris at fedde.us
Tue Apr 24 20:35:48 MDT 2012


My way of doing this kind of thing is to check if the environment then
set and exec if it is wrong:

#!/usr/bin/env perl

use Modern::Perl;

if (not $ENV{CHECKME}) {
    say "setting CHECKME";
    $ENV{CHECKME} = time;
    exec $0
}

say $ENV{CHECKME};



On Tue, Apr 24, 2012 at 1:15 PM, David L. Willson <DLWillson at thegeek.nu> wrote:
> Can a perl script "source" a bash script, such that exported variables in
> the bash script are visible in the perl script that called it, or do I
> absolutely have to use some sort of "message in a bottle"?
>
> --
> David L. Willson
> Trainer, Engineer, Enthusiast
> RHCE Network+ A+ Linux+ LPIC-1 Ubuntu
> Mobile 720-333-LANS(5267)
>
> This is a good time for a r3volution.
>
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue


More information about the clue mailing list