On Aug 23, 2012, at 10:51 AM, Irfan Sayed wrote: > it was quite rude. anyway
What was quite rude? > lets say if i have to display the contents of array using insert method. > if i just type : $t->insert("end", "@arr1"); > then surely , it will print the contents of array but on the same line I don't use Perl/Tk, but I am assuming $t is some sort of Tk widget, and you are attempting to add a string to the end of it. Maybe you can post a short, complete program that demonstrates what you are trying to do. > > i need to print the contents of array on separate line , so , i thought , i > should write one function where i will print the contents of array on each > line and call that function from insert method > please suggest I would recommend putting whatever you want to insert into a scalar variable and inserting that by making it the second argument of your insert statement. For example, if you want to insert the elements of an array, one element per line, do this: my $text = join("\n",@arr1); $t->insert('end', $text); -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/