Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: the command - system ( "source ./profile") not working

by rgiskard (Hermit)
on Jan 10, 2008 at 12:56 UTC ( #661611=note: print w/replies, xml ) Need Help??

in reply to the command - system ( "source ./profile") not working

Without seeing your error, why dont you do some testing with absolute paths. like:  system("source /home/perlmonkey/.profile") .

For debugging purposes, I would suggest using the backtick approach to see any stdout: print `source /home/perlmonkey/.profile`

Do note, your sourced profile will exist in the subshell you called it in. So to test it further you will have to do something like print `source .profile;echo $PATH` which assumes that there exists a path var in the shell.

Hopefully your in some type of linux enviroment, otherwise the commands you were calling would be somewhat faulty.

UPDATE:Take a look at the answer in the following node 616002 as it addresses the problem of sourcing a license which could be quite similar to your problem.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://661611]
[erix]: which still manages to sound more or less positive
[Corion]: Huh. I wasn't aware that you cannot segregate Python 2 and Python 3 modules... Hopefully Perl 6 module use C6AN and thus avoid the problem...
[hippo]: I very much hope so.
[moritz]: there are already some (very few) Perl 6 modules on CPAN, but in a way that the p5 indexer avoids them
[hippo]: It's confusing enough to have the Perl6:: namespace which isn't for Perl6 but for features from that ported into Perl.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-01-24 09:21 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (203 votes). Check out past polls.