-----Original Message-----
From: Dr.Ruud [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 20, 2006 4:18 PM
To: beginners@perl.org
Subject: Re: array help

>> my @test  = ("/test" , "/playground");
>> print @test;
>>
>> <snip>
>>
>> i need the output in following fasion
>>
>> /test
>> /playground
>>
>> can you please tell me what is wrong?

>Alternative-1:
>
>  print "$_\n" for @test ;
>
> <snip>


More traditional:

   foreach my $text(@test){
      print "$text\n";
   }


One more way:

   print join("\n",@test);





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to