[Chicago-talk] Scalar help.
Richard Reina
richard at rushlogistics.com
Thu May 10 06:40:58 PDT 2007
Brain,
This worked like a charm. Thanks so much. Next time you're in Lincoln Park let me know, I owe you a beer.
Richard
Richard,
Here's a sample program that simulates typed input, waits for the user
to edit/enter a line, and prints what it gets.
#!/usr/bin/perl -w
use strict;
my $sti = "Hello, world";
sub TIOCSTI { 0x5412; } # From e.g. /usr/include/asm/ioctls.h
foreach my $char (split(//, $sti))
{
ioctl(STDIN, TIOCSTI, $char);
}
print "Input received: ", scalar(<>);
# END
--
Brian Katzung
Kappa Computer Solutions, LLC
www.kappacs.com 877.367.8837 x1
_______________________________________________
Chicago-talk mailing list
Chicago-talk at pm.org
http://mail.pm.org/mailman/listinfo/chicago-talk
Your beliefs become your thoughts. Your thoughts become your words. Your words become your actions. Your actions become your habits. Your habits become your values. Your values become your destiny. -- Mahatma Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20070510/d552c760/attachment.html
More information about the Chicago-talk
mailing list