|
I´m trying to use linux commands in my perl script in this way:
$command=`cp file.txt /tmp/file.txt`;
print $command;
This code works properly but the problem begin when I try to insert a variable onto the "$command" variable.
There is any way to do something like this?
$file="/forum/file2.txt";
$command=`cp $file /tmp/$file`;
This lines don´t work but I need something that returns the same result.
Anybody know a solution?
|
|
|
Nice post about commands in perl script. I like your blog very much because it has very interesting articles of different topics like testking HP0-D03, testking HP0-D04 and testking HP0-J22 and their tips and tricks. I am a very big googler and search on different topics. Between searching i found your nice blog. Thanks for your this great blog.
|
|
|
|
|
|
|
|