SPUG: routine in foreach iterator

Jeff Saenz jeff.saenz at jpl.nasa.gov
Wed May 16 13:04:39 CDT 2001


can you use a routine that returns a list as the iterator for a loop. 
for example could i do this

foreach (@{sub_call()}) {
   do something
}

or would I map the sub_call inside the paren's.

jeff


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list