Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 98051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:07:20+00:00 2026-05-11T00:07:20+00:00

Here are the errors: $ perl ftper.pl Use of uninitialized value $id in hash

  • 0

Here are the errors:

 $ perl ftper.pl Use of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in delete at /usr/lib/perl5/vendor_perl/5.10/i686 cygwin/Tk/After.pm line 87. se of uninitialized value $id in delete at /usr/lib/perl5/vendor_perl/5.10/i686 cygwin/Tk/After.pm line 87. se of uninitialized value $id in delete at /usr/lib/perl5/vendor_perl/5.10/i686 cygwin/Tk/After.pm line 87. se of uninitialized value $id in delete at /usr/lib/perl5/vendor_perl/5.10/i686 cygwin/Tk/After.pm line 87. se of uninitialized value $id in delete at /usr/lib/perl5/vendor_perl/5.10/i686 cygwin/Tk/After.pm line 87. se of uninitialized value $id in delete at /usr/lib/perl5/vendor_perl/5.10/i686 cygwin/Tk/After.pm line 87.   

Here is the Perl/Tk code:

#! /usr/bin/perl -w  use strict; use Tk; use Tk::Scale; use File::DosGlob 'glob';   ##################################################################### # Define variables                              # ##################################################################### my $UserID; my $Password; my $BnsNode; my $Status_msg = 'BUILD SCRIPT!';  ##################################################################### # Window variables                          # ##################################################################### my $mw; my $frmUserID; my $lblUserID; my $frmPassword; my $lblPassword; my $edtUserID; my $edtPassword; my $frmTop; my $frmBig; my $frmButtonLine; my $btnExit; my $btnSubmit; my $lblStatus; my $lblUnixNode; my $frmUnixNode; my $edtUnixNode;  ################################################################# # Main Logic                            # ################################################################# init_mainwindow(); MainLoop;    ################################################################# # init_mainwindow                       # ################################################################# sub init_mainwindow {     $mw = MainWindow->new;     $mw->title('BUILD');     $mw->resizable(100, 100);     $mw->geometry('+175+100');      # Top Level frame for top section of form.     $frmTop = $mw->Frame(-bd => 2, -relief => 'ridge')         ->pack(-side => 'top', -fill => 'x', -pady => 3);       $frmUserID = $frmTop->Frame(-bd => 2)->pack(         -side => 'top', -fill => 'x');     $lblUserID = $frmUserID->Label(-text => 'Unix User ID:')         ->pack(-side => 'left');     $edtUserID = $frmUserID->Entry(-textvariable => \$UserID,         -background => 'white')->pack(-side => 'left');       $frmUnixNode = $frmTop->Frame(-bd => 2)->pack(     -side => 'top', -fill => 'x');     $lblUnixNode = $frmUserID->Label(-text => 'BNS Number')         ->pack(-side => 'left');     $edtUnixNode = $frmUserID->Entry(-textvariable => \$BnsNode,     -background => 'white')->pack(-side => 'left');   $frmPassword = $frmTop->Frame(-bd => 2)->pack(     -side => 'top', -fill => 'x'); $lblPassword = $frmPassword->Label(     -text => 'Password:    ')->pack(-side => 'left'); $edtPassword = $frmPassword->Entry(-textvariable => \$Password,     -background => 'white', -show => '*')     ->pack(-side => 'left');    # Top Level frame for bottom section of form. $frmButtonLine = $mw->Frame(-bd => 2, -relief => 'ridge')     ->pack(-side => 'top', -fill => 'x', -pady => 3);     $btnExit = $frmButtonLine->Button(-text => 'Exit',          -command => \&close_mw, -width => 6)->pack(         -side => 'right', -padx => 1);         $btnSubmit = $frmButtonLine->Button(-text => 'Run Script',      -command => \&execute_script, -width => 6)->pack(         -side => 'right', -padx => 1);     $lblStatus = $mw->Label(-textvariable => \$Status_msg,         -borderwidth => 2, -relief => 'groove')         ->pack(-fill => 'x', -side => 'bottom');      $edtUserID->focus;  }   ##################################################################### # excute_script                             # ##################################################################### sub execute_script {     unless (defined($UserID)) {         update_status('Must enter a user id!');         $edtUserID->focus;         return 0;     }     unless (defined($Password)) {         update_status('Must enter a password!');         $edtPassword->focus;         return 0;     }      update_status('$BnsNode ,$UserID '); }  ##################################################################### # close_mw                              # ##################################################################### sub close_mw {     $mw->destroy; }   ##################################################################### # update_status                             # ##################################################################### sub update_status {     my ($msg) = @_;      $Status_msg = $msg;     $lblStatus -> update; } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:07:20+00:00Added an answer on May 11, 2026 at 12:07 am

    The error messages themselves are straightforward enough:

    Use of uninitialized value $id in hash element at …Tk/After.pm line 39.

    Use of uninitialized value $id in delete at …Tk/After.pm line 87.

    • "Use of uninitialized value" means that you used a value with a value of undef (undefined).
    • $id is the name of the uninitialized variable.
    • "in hash element" means that you used the value as hash key, e.g. $h{$id}
    • "in delete" means that you used the value as a hash key to be deleted. e.g. delete $h{$id}
    • "…Tx/After.pm" is the module where the error occurred.
    • "line 39" and "line 87" are the line numbers (in the module) where the error occurred.

    Tk::After provides callback scheduling to Perl/Tk applications. Things like "run this function after (or every) 500 ms." $id is the identifier for a specific callback on a widget.

    What do do about the warnings is harder. I don’t see any explicit calls to Tk::After in the code you provided. It’s possible that there’s a bug in your Tk installation that’s triggering the warning. I don’t get any warnings when running it under Perl 5.10 with Tk 804.028.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie here, I am trying to use Bioperl module in the perl environment. My
There are many errors here in SO, but this scenario I think its different.
Here's what the post submit URL looks like: default.cfm?fuseaction=Seasons.edit&sid=2569#errors I've added an internal anchor
I am going to paste here my code and errors: #include stdio.h #include winsock2.h
What's wrong in here, I always get some nasty errors even if the same
We're using xVal and the standard DataAnnotationsValidationRunner described here to collect validation errors from
I'm trying to utilize setDebugFlags as recommended here to scan for opengl errors: http://developer.android.com/resources/articles/glsurfaceview.html
I need help... I got errors with my android xml... Here's the code: <?xml
In Perl, is there a way to force all fatal errors to display a
I write the following script #!/usr/bin/perl system( awk -F= '{s[$1]++}{print $1s[$1],$2}' OFS== /var/tmp/file );

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.