Help for this page

Select Code to Download


  1. or download this
    sub foo(\@) {
        my ($array) = @_;
    ...
    my @array = qw( foo bar Foo Bar );
    foo @{ sub { \@_ }->( grep /^[A-Z]/, @array ) };
    print "$_\n" for @array;
    
  2. or download this
    foo
    bar
    FOO
    BAR
    
  3. or download this
    sub foo {
        $_ = uc($_) for @_;
    ...
    my @array = qw( foo bar Foo Bar );
    foo grep /^[A-Z]/, @array;
    print "$_\n" for @array;
    
  4. or download this
    foo
    bar
    FOO
    BAR