if ( $movie eq 'beginning' ) { @sparta = ('soldier') x 300; } if ( $movie eq 'climax' ) { @sparta = ('soldier') x 10000; }