Help for this page

Select Code to Download


  1. or download this
           -n   causes Perl to assume the following loop around your
                program, which makes it iterate over filename argu-
    ...
                    while (<>) {
                        ...             # your program goes here
                    }
    
  2. or download this
    while(<>){
      / /, $;{$`}++}{print $_, $/ ^= "*" for %
    }
    
  3. or download this
    while(<>){
      / /, $;{$`}++
    ...
    {
      print $_, $/ ^= "*" for %
    }
    
  4. or download this
    while(<>){
      / /, $;{$`}++
    ...
    {
      print $_, $/ ^= "*" for %;
    }
    
  5. or download this
    use English;
    
    ...
        print $_, $INPUT_RECORD_SEPARATOR ^= '*';
      }
    }
    
  6. or download this
    $username $num_logins
    $username $num_logins
    
  7. or download this
    $ who|perl -MO=Deparse -ne'/ /,$;{$`}++}{print$_,$/^="*"for%'
    LINE: while (defined($_ = <ARGV>)) {
    ...
            print $_, $/ ^= '*';
        }
    }
    
  8. or download this
    s**lil*;  $*=join'',sort split q**;  s;.*;grr; &&s+(.(.)).+$2$1+; $; =
    qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)