> Hello, > > I try to write the name of the current directory in $x: > > $x = system ("pwd"); > > But it doesn't work. It also doesn't work in all these combinations:  > $x = 'system("pwd")'; > $x = system("`pwd`"); > > Can You help me to write the result of 'pwd' in $x?
Where is 'pwd'? You will find it in /usr/bin probably, just look Then do your system("/usr/bin") Generally though you might prefer to specify those commands earlier, eg, my $pwd = '/bin/pwd'; and then do asystem ("$pwd"); I think the failure occurs because perls environment is not the same as yours. Owen -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/