"Sayed, Irfan (Irfan)" schreef:
> I have written following line. but i am getting error
Which error?
> my @test = ("/test" , "/playground");
> print @test;
>
> i am getting output as follows
>
> /test/playground
>
> i need the output in following fasion
>
> /test
> /playground
>
> can you please tell me what is wrong?
Nothing is wrong, everything is as expected.
Alternative-1:
print "$_\n" for @test ;
Alternative-2:
{ local $\ = "\n" ; print for @test }
Alternative-3:
{ local ($\, $,) = ("\n", "\n") ; # see perlvar
print @test ;
}
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>