Perl in the movie "Sphere"?

Honza Pazdziora adelton na fi.muni.cz
Úterý Říjen 20 22:10:07 MEST 1998


Dovolim si jeden forward.

------------------------------------------------------------------------
 Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------

  [posted & mailed]
  [resurrecting an old thread from February]

In article <ORWANT.98Feb23162046 na cyrano.media.mit.edu>, Jon Orwant
<orwant na cyrano.media.mit.edu> wrote:
>
>mcafee na battlezone.rs.itd.umich.edu (Sean McAfee) writes:
>
>   I just got back from seeing the new movie "Sphere", and I think I saw part
>   of a Perl script on a computer screen at one point.  Perhaps someone else
>   can verify this, having also seen it or looking for it in the future...
>
>If anyone can positively identify the code, I'd love to mention it
>in the next issue of The Perl Journal.  

Heh.  I though the same when I watched _Sphere_ on video last night, so
I paused the tape to see exactly what the magic `commands' Harry typed
to translate the message were:

  $BSD = -f '/vmunix'; if ($BSD) { system "BIN
  cbreak </dev/tty >/dev/tty 2>&1

appeared to be the first, and

  set_cbreak(0)
      local($on) = $_[0];
      local($sgttyb, na ary);
      require 'sys/ioctl.ph';
  [snip]

is most of the second.  After digging around, I found almost exact
matches for both fragments in an *old* version of Tom's FAQ:

  Version: $Id: perl-intro,v 1.5 93/10/02 00:32:46 tchrist Exp Locker: tchrist $

  [snip]

  2.9) How can I read a single character from the keyboard under UNIX and DOS?

  [snip]

  $BSD = -f '/vmunix';
  if ($BSD) {
      system "stty cbreak </dev/tty >/dev/tty 2>&1";
  }

  [snip ~16 lines]

  sub set_cbreak { # &set_cbreak(1) or &set_cbreak(0)
      local($on) = $_[0];
      local($sgttyb, na ary);
      require 'sys/ioctl.ph';

  [snip]

It seems unlikely that these were taken from a single script, since they
are different ways to do the same thing.

Given also that these fragments occurred in the same order as the two
examples given in the FAQ answer, maybe they were taken from it
directly.

Regards,
-- 
Brendan O'Dea                                        bod na compusol.com.au
Compusol Pty. Limited                  (NSW, Australia)  +61 2 9809 0133


Další informace o konferenci Perl