At 01:45 PM 6/7/01 -0500, Shawn wrote:
>Can someone let me know what effectively is the difference between
>@files = grep {/jpe?g$/i} readdir DIR;
>and
>@files = grep /jpe?g$/i, readdir DIR;
>?
>
>Or is there any?

There isn't.  Some people like to use only the block form even in those 
cases where the expression form will do, for consistency.  Some people like 
to use the expression form where possible because they can use => instead 
of , and especially in the map statement (which has the same two syntax 
forms) this looks very mnemonic.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com

Reply via email to