array executes only first

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rasdj@frontiernet.net

    array executes only first

    touch.txt is:

    touch a
    touch b

    The following code produces the file "a" but not "b".

    #!/usr/bin/perl
    $data_file="tou ch.txt";
    open(cmd, $data_file) || die("Could not open file!");
    @raw_data=<cmd> ;
    close(cmd);
    foreach $line (@raw_data)
    {
    exec $line;
    }

    Thank you,

    RasDJ

  • rasdj@frontiernet.net

    #2
    Re: array executes only first

    um... ok

    system()

    Comment

    Working...