Hmmmm ... what about this:
which does actually put odds in one file and evens in another.open( FH1 , '>foo' ); open( FH2 , '>bar' ); @fhs = ( FH1 , FH2 ); print { $fhs[ $_ % 2 ] } "$_\n" for ( 1 .. 10 );
I understood this as the BLOCK returning the last value. Is something else going on?
Scott 'Confused in Indiana' CrittendenIn reply to Re: Re: {} vs do{}
by scott
in thread {} vs do{}
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |