Help for this page

Select Code to Download


  1. or download this
    my @in;
    while (<>) {
        push @in, $1 if /(\$[A-Za-z_]\w*)/;
    }
    
  2. or download this
    while (<>) {
        push @in, /(\$[A-Za-z_]\w*)/g;
    }
    
  3. or download this
    my %hsh;
    @hsh{@in} = ();
    print $_, $/ for keys %hsh;
    
  4. or download this
    my %hsh;
    @hsh{ /(\$[A-Za-z_]\w*)/g } = () while <>;
    delete $hsh{''};  # tidy up
    print $_, $/ for keys %hsh;