BT368i

 view release on metacpan or  search on metacpan

examples/bt368i-tk.pl  view on Meta::CPAN

		$bt368i->connect();
	}

}

#----------------------------------------#
# build the menu bar
#----------------------------------------#
sub build_menubar {
	# Create the menubar and File and Quit menubuttons.  Note
	# that the cascade's menu widget is automatically created.
	my $menubar = $mw->Menu;

	$mw->configure(-menu => $menubar);

	my $file = $menubar->cascade(-label => '~File');
	my $port = $menubar->cascade(-label => '~Port');
	my $help = $menubar->cascade(-label => '~Help', -tearoff => 0);

	open(CMD, "ls -l /dev/tty.*|");
	while(<CMD>) {
		chomp();
		$_ =~ /tty\.(.*)$/;
		my $tty = $1;
		# Create the menuitems for each menu.  First, the File menu item.
		$port->command(-label => $tty, -command => [\&select_port, $tty]);
	}
	close(CMD);



( run in 0.464 second using v1.01-cache-2.11-cpan-49f99fa48dc )