Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7072

Strange `pwd` output from Perl

$
0
0

I have a very short tutorial Perl script:

#!/usr/bin/perlprint "The date is ",`date`;print "The date is `date`",".\n";$directory=`pwd`;print "\nThe current directory is $directory.";

and the output:

The date is Sat Jul  2 17:04:58 PDT 2011The date is `date`.The current directory is total 20-rwxr-xr-x 1 yan yan 433 2011-07-02 15:58 36-rwxr-xr-x 1 yan yan 313 2011-07-02 16:29 43-rwxr-xr-x 1 yan yan 116 2011-07-02 16:51 45-rwxr-xr-x 1 yan yan 149 2011-07-02 16:53 46-rwxr-xr-x 1 yan yan 145 2011-07-02 17:02 47

But, if I just run pwd, I got:

yan@ubuntu:~/bin/blackperl$ pwd/home/yan/bin/blackperl

Is there any logical explanation to the mystery here?


Viewing all articles
Browse latest Browse all 7072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>