[펄스크립트] foreach

2017. 4. 2. 17:06펄스크립트

#!/usr/bin/perl


@array = `./print.pl 20170101 20170228`;

foreach $a ( @array ){

  chomp $a;

 print "/root/print.pl $a\n";

}