http://www.perlmonks.org?node_id=985685


in reply to I need to export variable as another user

Have a look at the first error-message:
Bareword found where operator expected at testscript.pl line 12, near +"print " PATH" (Might be a runaway multi-line "" string starting on line 7)
I suppose the following is line 7, as the closing " is missing:
my $bash_profile_run = system(". /home/mrdemo1/pig_profile_tmp);
HTH, Rata

Replies are listed 'Best First'.
Re^2: I need to export variable as another user
by rahulruns (Scribe) on Aug 06, 2012 at 12:23 UTC

    Corrected the error but still not getting output

    output /home/mrdemo1/pig.jar excite.log.bz2 pig_1344241951706.log pig_1344244494512.log p +ig_1344245634547.log pig.jar script1-local-results.txt +tutorial.jar excite-small.log pig_1344243339709.log pig_1344245480551.log p +ig_1344246062938.log script1-hadoop.pig script2-hadoop.pig pig_1344241663743.log pig_1344243831809.log pig_1344245595053.log p +ig_1344246760544.log script1-local.pig script2-local.pig PATH IS and