R
rasdj
touch.txt is:
touch a
touch b
The following code produces the file "a" but not "b".
#!/usr/bin/perl
$data_file="touch.txt";
open(cmd, $data_file) || die("Could not open file!");
@raw_data=<cmd>;
close(cmd);
foreach $line (@raw_data)
{
exec $line;
}
Thank you,
RasDJ
touch a
touch b
The following code produces the file "a" but not "b".
#!/usr/bin/perl
$data_file="touch.txt";
open(cmd, $data_file) || die("Could not open file!");
@raw_data=<cmd>;
close(cmd);
foreach $line (@raw_data)
{
exec $line;
}
Thank you,
RasDJ