Help for this page

Select Code to Download


  1. or download this
    sub ShowIt {
     print join(',',@_);
    ...
    
    @Foo = (1,2,3);
    &ShowIt(@Foo);
    
  2. or download this
    sub ShowIt {
     my $Array1 = $_[0];
    ...
    @Foo = (1,2,3);
    @Bar = (4,5,6);
    &ShowIt(\@Foo,\@Bar);
    
  3. or download this
    @Cities_DE = ('Berlin','Hannover','Hamburg');
    @Cities_US = ('New York','Miami','Las Vegas');
    %Cities = ('DE' => \@Cities_DE,
               'US' => \@Cities_US);
    print "Where are you?".join(',',@$Cities{$Country});