[Discuss] perl beep

Bill Ricker bill.n1vux at gmail.com
Wed Jan 26 15:14:21 EST 2022


On Wed, Jan 26, 2022 at 2:50 PM dan moylan <jdm at moylan.us> wrote:

>
> made a metronome in perl but can't find a
> way to make a tic (or toc).  any suggestions?



say qq(\x07);

if a recent enough Perl. (
Otherwise
   print "\0x07";
or the very BASIC-ish
   print chr(7);
)
NOTE: must be qq or "" in order for \x to be interpreted as hex 07

If this does NOT make a sound, check
 (a) settings on your Terminal window; on mine
  Edit>Preferences>Standard>Sound [✓]Terminal Bell
(b) desktop sound settings - is Terminal muted, or routed to a jack with no
headphones?

(Also, Perl questions are welcome on the Boston Perl list too.
https://Boston.pm.org/bpm/ )


More information about the Discuss mailing list