> -----Original Message-----
> From: John Edwards [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, July 26, 2001 4:43 AM
> To: 'Ron Smith'; [EMAIL PROTECTED]
> Subject: RE: array contents to a file
> 
> ...
> foreach $element(@array) {
>       print FILE "$element\n";
> }

FWIW, this can be simplifed to:

   print FILE "$_\n" for @array;

Folks often forget about the statement modifiers (especially if coming from
a C background). But they are extremely common and contribute to concise,
readable code.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to