Thanks a lot HTH ( Brian),
This worked for me.
Regards,
Mujju
On 6/4/09, Brian Raven <[email protected]> wrote:
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Perl Perl
> Sent: 04 June 2009 17:22
> To: [email protected]
> Subject: inserting the file paths in between the two arrays ( text
> widget ) : Perl/TK
>
> > Dear All,
> > I have written a script, which has to enter the file path
> (Paths ), in between the text. For this I
> > have used below approach.
> > 1) I divide the file in two parts, in which file path(s) has to be
> inserted.
> > -> Here @File_Part1 stores the first prart of file.
> > -> @File_Part2 stores the second part of file.
> > 2) Then script will capture the file path entry into @File_Parth
> array.
> > 3) Now I will insert the @File_Path array in between @File_Part1 and
> @File_Part2, to achive our goal.
> > But the problem is, The widget is diplaying(inserting) only last
> file pathselected with Tk::Pathenty. But > my aim is to insert the
> number of file path as selected with Tk::PathEntry tk module.
> > Plese help me to overcome this. Please find the code below for your
> kind reference.
>
> ...
>
> > ## This function will the capture the file path entrires and store
> into an array, @File_Part.
> >
> > sub Capture {
> > @File_Path =$path;
>
> You have just told Perl to replace the contents of @File_Path with
> $path. That is, the array will only ever contain the last value that is
> assigned to it. I would guess that you would prefer to append the $path
> to the array. In which case see 'perldoc -f push'.
>
> > #open (FILE,">>f1.txt") or die "Can't open $!";
> > #foreach (@File_Path) {
> > # print FILE $_;
> > # $t -> insert ("end", $_);
> >
> > #}
> > }
>
> HTH
>
> --
> Brian Raven
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient or have received this e-mail in error, please
> advise the sender immediately by reply e-mail and delete this message and
> any attachments without retaining a copy.
>
> Any unauthorised copying, disclosure or distribution of the material in
> this e-mail is strictly forbidden.
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
--
--
Regards,
Mujju
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs