User Profile

Collapse

Profile Sidebar

Collapse
lashaw
lashaw
Last Activity: May 24 '10, 05:43 AM
Joined: Mar 25 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lashaw
    started a topic Foreach looping an array in perl tk.
    in Perl

    Foreach looping an array in perl tk.

    This program is suppose to only display one name and number after the buttom is pressed. But the problem is it only displays the first name and number after the button is pressed. It won't display any other names or numbers but the first line. The program is not reading each line one at a time per button press. Only continue to display the first line in the file after the button is pressed. All help will be graceful!

    [code=perl tk]...
    See more | Go to post

  • lashaw
    replied to How to read every line of file into array
    in Perl
    What I mean is how to display one name at a time when the button is pressed instead of showing the whole list all at one time.
    See more | Go to post

    Leave a comment:


  • lashaw
    replied to How to read every line of file into array
    in Perl
    Thanks RonB for the insight but how to get it to display each name after I press the button?
    See more | Go to post

    Leave a comment:


  • lashaw
    replied to How to read every line of file into array
    in Perl
    The problem is using this coding for perl tk. Im having difficulties with this event-driven part. The problem is this program is only displaying the last line in the file. Need it to display each name, and after the buttom is pressed display the next name. All help will be considered an honor.
    [code=perl tk]

    require Tk;
    use Tk ':eventtypes';
    use Tk;

    my $mw = MainWindow->new();

    ...
    See more | Go to post

    Leave a comment:


  • lashaw
    replied to How to read every line of file into array
    in Perl
    I forgot to mention the array works fine in perl with is text-based. But the problem is using this coding for perl tk. Im having difficulties with this event-driven part. All help will be considered an honor.
    See more | Go to post

    Leave a comment:


  • lashaw
    replied to How to read every line of file into array
    in Perl
    Sorry about the missing code tags.
    See more | Go to post

    Leave a comment:


  • lashaw
    replied to How to read every line of file into array
    in Perl
    I should had tried to put my data set in a hash from the beginning. Hashes are good for handling large data sets.

    Thank you to everyone that responded and I will get back to you to tell you how it goes.
    See more | Go to post

    Leave a comment:


  • lashaw
    started a topic How to read every line of file into array
    in Perl

    How to read every line of file into array

    This program display a names. If the name you type match the one asked to type, the program tells you the phone number of the name. The problem is it only list the last name in the file. How to get the program to start at the first name in the file, and after you type it correct, show name number and move to the next name? All help would be graceful!!
    Code:
    open (FILE, "profile.txt") || die "Can't open File.txt: $!\n";
    ...
    See more | Go to post
    Last edited by numberwhun; Mar 25 '10, 02:11 PM. Reason: Please use CODE TAGS!!!
No activity results to display
Show More
Working...