An airport animation

# remember @y = ("smrfnexi', "--", "tjfillx", "ybvwvngwr", " ;-)\r") in the beginning
for ( split $c ) {
    print @y if (
       select( $/, $,, $<, .1 * rand ) || ( $y += $p++ + &c ) )
       ... # the range operator
      ( substr($y[&a], &p, 1) = chr 97 + (ord(substr $y[&a], &p, 1) + c()) % 26);
}
# for the record: the helper subs
sub a { $p % 3 * 2 }
sub p { $y % length $y[&a] }
sub c { length }

Explanation: The words are changed in a cyclic way. In each word, one letter is changed at a time. The index of the letter in the current word, and the offset to get to the next letter are calculated from the length of the current block.

Naturaly, the initial string was calculated with the current logo to obtain the message.

Previous | Next


Copyright © 2000-2001, Philippe "BooK" Bruhat.