#!/usr/bin/perl use warnings; use strict; my $scalar = 'We Be Killing Zombies Tonite'; my @array = qw( poo.txt moo.txt doo.txt goo.txt ); my @handles; for my $name ( @array ) { open my $FH, '>', $name or die "Cannot open '$name' $!"; push @handles, $FH; } for my $FH ( @handles ) { print $FH $scalar; }
In reply to Re: Output To File with Array help
by jwkrahn
in thread Output To File with Array help
by SirDonkeyPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |