Re: please explain the anonymous sub usage in one of the article from stonehenge in detail for me

2008-11-07 Thread Richard Lee
Jenda Krynicky wrote: If we name the subroutine the code would look like this: sub read_from_stdin { return ; } ... $next = non_blank(\&read_from_stdin); that is again the non_blank() would receive a reference to a subroutine that reads one line from STDIN whenever called. (actually this is

Re: please explain the anonymous sub usage in one of the article from stonehenge in detail for me

2008-11-07 Thread Jenda Krynicky
From: Richard Lee <[EMAIL PROTECTED]> > http://www.stonehenge.com/merlyn/UnixReview/col08.html > > From above article, I am not fully understanding what's going on on > below code. > > 1)is there any difference in $next = $non_blank() and > $next=$non_blank( sub{ }) in terms of funcaitonalit

please explain the anonymous sub usage in one of the article from stonehenge in detail for me

2008-11-07 Thread Richard Lee
http://www.stonehenge.com/merlyn/UnixReview/col08.html From above article, I am not fully understanding what's going on on below code. 1)is there any difference in $next = $non_blank() and $next=$non_blank( sub{ }) in terms of funcaitonality? I am not fully understanding the difference in