Kuhl <> wrote:
> Hi, all:
>
> Backticks `` are supposed to be able to transfer the result of shell
> commands to Perl variable.
> But it's very confusing that it does not behave in the way that I
> think it should do.
>
> $current_path=`pwd`; This works.
> $current_path=`echo $cwd`; This does not work.
[..]
> #!/usr/bin/perl
use strict;
use warnings;
and all becomes clear. It does work, you only misunderstand ``.
There is a very good reason why those two lines are recommended daily in
this group.
--
John
http://johnbokma.com/ - Hacking & Hiking in Mexico
Perl help in exchange for a gift:
http://johnbokma.com/perl/help-in-ex...or-a-gift.html