きくたにです。

コマンド出力の結果がperlとrubyで違うのです。

最初perl(5.003_07)です。

$file = $0;
printf "this file = %s\n", $file;
$tmp = `ls $file`;
printf "ls output = %s\n", $tmp;


% perl file-test.pl
this file = file-test.pl
ls output = file-test.pl


次ruby-1.0-970821です。

$file = $0
printf "this file = %s\n", $file
$tmp = `ls $file`
printf "ls output = %s\n", $tmp

% ruby file-test.rb
this file = file-test.rb

ls output = 以後カレントディレクトリの内容全部表示

why ??

-- 
人生を背負い投げ

菊谷 誠(Kikutani Makoto)  kikutani / eis.or.jp kikutani / jdc.ericsson.se
hgf03701 / niftyserve.or.jp    http://www.eis.or.jp/muse/kikutani/