Help for this page

Select Code to Download


  1. or download this
    my $var = "Hi!";
    {
       print("$var\n");
    }
    
  2. or download this
    my $var = "Hi!";
    for (1..2) {
       print("$var\n");
    }
    
  3. or download this
    my $var = "Hi!";
    print(map { "$var\n" } 1..2);
    
  4. or download this
    my $var = "Hi!";
    sub func {
       print("$var\n");
    }
    func();
    
  5. or download this
    {
       my $var = "Hi!";
    ...
    }
    
    func();