Help for this page
while(defined($rivi = <ROWS>)) { chomp $rivi; .... }
open(E,">>style1.txt") or die $!; print E "$rivi\n"; # not understanding why you have $text here close(E);