----- Original Message ----
From: pouliakhina <[email protected]>
To: [email protected]
Sent: Saturday, February 7, 2009 8:59:56 AM
Subject: bash in perl
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?
Thank You,
Irina
##########################################
Ur Welcome!
$ perl -le '$x = system("pwd"); print $x;'
/home/Smith
0
sm...@smith-laptop ~
$ perl -le '$x = qx(pwd); print $x;'
/home/Smith
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/