Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Nick Kostirya                        2:5020/400     19 Mar 2003  13:31:02
 To : Yury Kopyl
 Subject : Re: theoretical question about simplification of spelling
 -------------------------------------------------------------------------------- 
 
 >  NK> Hе подскажите, как можно упростить следующий код, выбросив временную
 >  NK> переменную
 >
 >  NK> my $temp_v = fun(....);
 >  NK> $v = $temp_v if $temp_v;
 >
 > $v = fun(....) || undef;
 
 Спасибо.
 И как это я не додумался до очевидной вещи?
 К тому же не совсем точно описал задачу:
 хотел получить вот это
 $v = fun(....) || $v;
 
 Еще раз спасибо, за снятие с тормоза.
 Hиколай.
 
 --- ifmail v.2.15dev5
  * Origin: Demos online service (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 theoretical question about simplification of spelling   Nick Kostirya   19 Mar 2003 11:24:47 
 Re: theoretical question about simplification of spelling   Yury Kopyl   19 Mar 2003 12:45:04 
 Re: theoretical question about simplification of spelling   Nick Kostirya   19 Mar 2003 13:31:02 
 Re: theoretical question about simplification of spelling   Artem Chuprina   19 Mar 2003 15:45:16 
 theoretical question about simplification of spelling   Ruslan Sulemanov   20 Mar 2003 21:14:40 
 Re: theoretical question about simplification of spelling   John Lepikhin   21 Mar 2003 14:34:54 
 Re: theoretical question about simplification of spelling   Andrew Alakozow   21 Mar 2003 12:55:23 
 Re: theoretical question about simplification of spelling   Artem Chuprina   21 Mar 2003 12:36:20 
 theoretical question about simplification of spelling   Ruslan Sulemanov   21 Mar 2003 13:20:23 
 theoretical question about simplification of spelling   P4elovod Planety   21 Mar 2003 02:41:48 
Архивное /ru.perl/1134632d64bd5.html, оценка 1 из 5, голосов 22
Яндекс.Метрика
Valid HTML 4.01 Transitional