Is this what you wan't ? > open INPUT,"<$ARGV[0]"; > while ($line=<INPUT>){ > push (@array,$line); > }
> foreach $i(@array){ > print $i; > } "Andrej Kastrin" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] >I wrote simple script, which have to concatenate multiple lines into array >and then print each element of tihis array: > > open INPUT,"<$ARGV[0]"; > while ($line=<INPUT>){ > push (@array,$line); > foreach $i(@array){ > print $i; > } > } > > Input is e.g. > line 1 > line 2 > > I don't know where is the problem, Please, help! > > Cheers, Andrej -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>