Help for this page

Select Code to Download


  1. or download this
    unless ( open( FILE, "name_of_file" ) ) {
        die "Could not open file for reading\n";
    }
    
  2. or download this
    while (<FILE>) {
        if ($_ =~ /^(maintenance_mode)\s([\w,=]*)$/) {
    
  3. or download this
    $var =~ /whatever/;
    
  4. or download this
    $_ =~ /whatever/;
    
  5. or download this
    /whatever/;
    
  6. or download this
    for ($foo) {
        s/^"//;
    ...
    }
    # or also:
    # s/^"//, s/"$//, s/\W+/-/ for $foo;
    
  7. or download this
        $hash{$1} = $2;
    
        }
    }