Remove the tab or spaces before the EOT label. It must be the only thing on that line.
Bob McConnell > -----Original Message----- > From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED] > Sent: Monday, August 06, 2007 11:03 AM > To: beginners@perl.org > Subject: Error in executing the script > > Hi All, > > I have following script > > #!/usr/atria/bin/Perl > use strict; > use warnings; > > # Subroutine prototypes > join_proj(); > rebase(); > deliver(); > quit(); > > # Define the actions to take > my %action_to_take = ( > '1' => \&join_proj, > '2' => \&rebase, > '3' => \&deliver, > '4' => \&quit, > ); > > # Print the menu selection > print <<"EOT"; > Select one of: > 1. Join the project > 2. Rebase > 3. Deliver > 4: quit > EOT > > # Get the user's input > my $menu_item = <>; > chomp($menu_item); > > # Take action based on the user's choice > if (defined $action_to_take{$menu_item}) { > $action_to_take{$menu_item}->(); > } else { > print "I didn't understand the command.\n"; > do_exit(); > } > > exit 0; > > #------------------------------------------------------------- > sub join_proj() { > print "Joining Project\n"; > return; > } > > sub rebase() { > print "rebasing\n"; > return; > } > > sub deliver() { > print "delivering...\n"; > return; > } > sub quit() { > print "Exiting\n"; > return; > } > > I am getting following error. > > Can't find string terminator "EOT" anywhere before EOF at > merge.pl line > 29 > > Can somebody please help > > Regards > Irfan. > > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/