0

テキストファイルがあります

# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT    = " "

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
# also the default input encoding. Doxygen uses libiconv (or the iconv built
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
# the list of possible encodings.

" " の間の INPUT 行にパス名を入力する必要があります。

私のコード

use strict;
use warnings;

open(FILE, "< abcd") or die $!;
open(FILE1, "> abcd1") or die $!;

my @lines = <FILE>;
my $i = $ARGV[0];
$lines[5] = "";
splice @lines,5,0, 'INPUT    = "$i"';

print FILE1 @lines;
close(FILE);

出力は次のようになります

INPUT    = "$i"

しかし、私は出力が欲しい

INPUT    = "abcd"           #abcd is whatever is passed as arguments
4

2 に答える 2