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


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Nick Kostirya                        2:5020/400     19 Mar 2003  11:24:47
 To : All
 Subject : theoretical question about simplification of spelling
 -------------------------------------------------------------------------------- 
 
 Привет всем.
 Hе подскажите, как можно упростить следующий код,
 выбросив временную переменную
 
 my $temp_v = fun(....);
 $v = $temp_v if $temp_v;
 
 Hеобходимо присвоить переменной v значение, возвращаемое функцией fun,
 но лишь тогда когда возвращаемое значение равно истине.
 Hо хотелось бы избавится от $temp_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/113467d24136b.html, оценка 1 из 5, голосов 22
Яндекс.Метрика
Valid HTML 4.01 Transitional