Help for this page

Select Code to Download


  1. or download this
    my @array = qw(1 2 3);
    @array = qw(one two three) if $op eq 'alpha';
    
  2. or download this
    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';
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        my $greeting = shift;
        print "goodbye $greeting\n";
    }