我有一个 csv 文件,我从中逐行获取数据并调用函数并给出值。我只希望 csv 文件中的值之一可配置,因此我放置了 $ 符号,但其值未在程序,我已经将相同的值添加到程序中,以便它可以采用该值。
从 csv 文件中,我得到的值为:
1, TC_6.01_UA_CREATE_USER ,$create_user_command
这是功能: -
sub function{
# $create_user_command --this is the global variable
# that i take from the config file ;
print "$create_user_command";
# it is showing the command-- create user
my $tc_name = $_[1];
print "test case name : $tc_name\n";
my $test_command = $_[2];
# the value at the second index $_[2]is the value
# from the csv file that i want to configure
print "test case command: $test_command\n";
# this is just simply printing the value from csv
# i.e $create_user_command but not interpreting it
print "$test_command\n";
}
我只想如何$create_user_command
从 csv 中解释该值。请帮助我