Help for this page

Select Code to Download


  1. or download this
    perl -pe 's/^\[//; s/\]$//' < hall
    
  2. or download this
    while (<>) {
    
  3. or download this
        print;
    }
    
  4. or download this
    #!/path/to/perl
    # (usually, on *nix, the path is /usr/bin/perl)
    ...
        s/\]$//;  #  the "]" need to be preceded by backslash
        print;
    }
    
  5. or download this
    while (<>) {
        chomp;
        print substr( $_, 1, length() - 2 ), $/;
    }