1. Этот сайт использует файлы cookie. Продолжая пользоваться данным сайтом, Вы соглашаетесь на использование нами Ваших файлов cookie. Узнать больше.

Это интересно. Языки программирования

Тема в разделе "Программирование", создана пользователем AlTk, 08.10.05.

  1. AlTk

    AlTk Читатель

    10.692
    0
  2. The Last Winged

    The Last Winged Активный участник

    12.552
    376
    http://www.99-bottles-of-beer.net/language-perl-737.html

    перл как всегда выделился =)))

    Данная программа:
    Код:
        ''=~(        '(?{'        .('`'        |'%')        .('['        ^'-')
        .('`'        |'!')        .('`'        |',')        .'"'.        '\\$'
        .'=='        .('['        ^'+')        .('`'        |'/')        .('['
        ^'+')        .'||'        .(';'        &'=')        .(';'        &'=')
        .';-'        .'-'.        '\\$'        .'=;'        .('['        ^'(')
        .('['        ^'.')        .('`'        |'"')        .('!'        ^'+')
       .'_\\{'      .'(\\$'      .';=('.      '\\$=|'      ."\|".(      '`'^'.'
      ).(('`')|    '/').').'    .'\\"'.+(    '{'^'[').    ('`'|'"')    .('`'|'/'
     ).('['^'/')  .('['^'/').  ('`'|',').(  '`'|('%')).  '\\".\\"'.(  '['^('(')).
     '\\"'.('['^  '#').'!!--'  .'\\$=.\\"'  .('{'^'[').  ('`'|'/').(  '`'|"\&").(
     '{'^"\[").(  '`'|"\"").(  '`'|"\%").(  '`'|"\%").(  '['^(')')).  '\\").\\"'.
     ('{'^'[').(  '`'|"\/").(  '`'|"\.").(  '{'^"\[").(  '['^"\/").(  '`'|"\(").(
     '`'|"\%").(  '{'^"\[").(  '['^"\,").(  '`'|"\!").(  '`'|"\,").(  '`'|(',')).
     '\\"\\}'.+(  '['^"\+").(  '['^"\)").(  '`'|"\)").(  '`'|"\.").(  '['^('/')).
     '+_,\\",'.(  '{'^('[')).  ('\\$;!').(  '!'^"\+").(  '{'^"\/").(  '`'|"\!").(
     '`'|"\+").(  '`'|"\%").(  '{'^"\[").(  '`'|"\/").(  '`'|"\.").(  '`'|"\%").(
     '{'^"\[").(  '`'|"\$").(  '`'|"\/").(  '['^"\,").(  '`'|('.')).  ','.(('{')^
     '[').("\["^  '+').("\`"|  '!').("\["^  '(').("\["^  '(').("\{"^  '[').("\`"|
     ')').("\["^  '/').("\{"^  '[').("\`"|  '!').("\["^  ')').("\`"|  '/').("\["^
     '.').("\`"|  '.').("\`"|  '$')."\,".(  '!'^('+')).  '\\",_,\\"'  .'!'.("\!"^
     '+').("\!"^  '+').'\\"'.  ('['^',').(  '`'|"\(").(  '`'|"\)").(  '`'|"\,").(
     '`'|('%')).  '++\\$="})'  );$:=('.')^  '~';$~='@'|  '(';$^=')'^  '[';$/='`';
    действительно работает и выводит:
    Код:
    99 bottles of beer on the wall, 99 bottles of bee
    Take one down, pass it around,
    98 bottles of beer on the wall!
    
    98 bottles of beer on the wall, 98 bottles of bee
    Take one down, pass it around,
    97 bottles of beer on the wall!
    
    97 bottles of beer on the wall, 97 bottles of bee
    Take one down, pass it around,
    96 bottles of beer on the wall!
    
    96 bottles of beer on the wall, 96 bottles of bee
    Take one down, pass it around,
    95 bottles of beer on the wall!
    
    ....
    пропущен кусок вывода  для экономии траффика читателей форума =)
    ...
    
    3 bottles of beer on the wall, 3 bottles of beer!
    Take one down, pass it around,
    2 bottles of beer on the wall!
    
    2 bottles of beer on the wall, 2 bottles of beer!
    Take one down, pass it around,
    1 bottle of beer on the wall!
    
    1 bottle of beer on the wall, 1 bottle of beer!
    Take one down, pass it around,
    No bottles of beer on the wall!