<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: captive perl menu - trap user keystrokes in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896016#M701304</link>
    <description>I should also mention (since this is probably what you want to do) that it's also very easy to ignore signals.&lt;BR /&gt;&lt;BR /&gt;$SIG{INT} = 'IGNORE';&lt;BR /&gt;$SIG{HUP} = 'IGNORE';&lt;BR /&gt;</description>
    <pubDate>Wed, 13 Apr 2005 15:18:51 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2005-04-13T15:18:51Z</dc:date>
    <item>
      <title>captive perl menu - trap user keystrokes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896014#M701302</link>
      <description>Hi all:&lt;BR /&gt;&lt;BR /&gt;Got Perl 5.8.3 on HPUX 11x systems. I have made a type of menu program for the helpdesk personnel. Question, I want this menu to be captive (it is) but I also want to prevent users from breaking out of the menu.&lt;BR /&gt;&lt;BR /&gt;What are the traps? How do I define them?&lt;BR /&gt;&lt;BR /&gt;Many thanks!&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Apr 2005 15:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896014#M701302</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-04-13T15:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: captive perl menu - trap user keystrokes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896015#M701303</link>
      <description>Signal handlers (traps) in Perl are done almost exactly the way they are done in C.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;my $Flag = 0; # we'll set this guy in a 'trap'&lt;BR /&gt;&lt;BR /&gt;sub inttrap&lt;BR /&gt;{&lt;BR /&gt;  $Flag = 1;&lt;BR /&gt;  return(-1);&lt;BR /&gt;} # inttrap&lt;BR /&gt;&lt;BR /&gt;$SIG{INT} = \&amp;amp;inttrap; # associate a signal with a subroutine&lt;BR /&gt;&lt;BR /&gt;# Now for an extremely simple read statement.&lt;BR /&gt;&lt;BR /&gt;my $s = &lt;STDIN&gt;;&lt;BR /&gt;&lt;BR /&gt;print "Flag = ${Flag}\n"&lt;BR /&gt;&lt;BR /&gt;Examine the value displayed when you do and don't press the intr key.&lt;BR /&gt;&lt;/STDIN&gt;</description>
      <pubDate>Wed, 13 Apr 2005 15:15:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896015#M701303</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-04-13T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: captive perl menu - trap user keystrokes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896016#M701304</link>
      <description>I should also mention (since this is probably what you want to do) that it's also very easy to ignore signals.&lt;BR /&gt;&lt;BR /&gt;$SIG{INT} = 'IGNORE';&lt;BR /&gt;$SIG{HUP} = 'IGNORE';&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Apr 2005 15:18:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896016#M701304</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-04-13T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: captive perl menu - trap user keystrokes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896017#M701305</link>
      <description>many thanks!</description>
      <pubDate>Wed, 13 Apr 2005 15:23:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/captive-perl-menu-trap-user-keystrokes/m-p/4896017#M701305</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-04-13T15:23:17Z</dc:date>
    </item>
  </channel>
</rss>

