my @array = qw(1 2 3); @array = qw(one two three) if $op eq 'alpha'; #### my @xxx; @xxx = qw(one two three) if $op eq 'numbers'; @xxx = qw(four five) if $op eq 'alpha'; @xxx = qw(six ten) if $op eq 'alp'; #### #!/usr/bin/perl -w use strict; hello('world'); goodbye('world'); sub hello { my $greeting = shift; print "hello $greeting\n"; } sub goodbye { my $greeting = shift; print "goodbye $greeting\n"; }