Help for this page

Select Code to Download


  1. or download this
            open (DAT, "@ARGV");
    
  2. or download this
            open mt $DAT, '<', $ARGV[ 0 ] or die "Cannot open '$ARGV[0]' $
    +!";
    
  3. or download this
            while ($line = <DAT>){
                    do (@word = split (/\W/, $line));
    ...
                    }else {
                            $charCount{$char}=1;
                    }
    
  4. or download this
            my %charCount;
            while ( my $line = <$DAT> ) {
    ...
            foreach my $char ( keys %charCount ) {
                    print "$char => $charCount{$char}\n";
            }
    
  5. or download this
            close(DAT, "@ARGV");
    
  6. or download this
            close $DAT;