這樣試試

假設你的TEXT FILE is foo, PERL file is bar.pl

#!/bin/sh

for line in `cat foo`
do
echo "$"$line >> foo.pl
done

在bar.pl裏,加上一行
require "foo.pl"

請您先登陸,再發跟帖!