Help for this page

Select Code to Download


  1. or download this
    print "\nHere is a list to select from:\n";
    print "A. Set input filename\n";
    ...
    
  2. or download this
    print END;
    This is
    text that
    only needs one print
    END
    
  3. or download this
    chomp ( $selec = <STDIN> );
    
  4. or download this
    $selec =~ s/[a-z]/[A-Z]/;
    
  5. or download this
    $selec =~ tr/a-z/A-Z/;
    
  6. or download this
    $selec = uc($selec);
    
  7. or download this
    if ( $selec eq 'A' ) {
            namefile();
            Menu ();
            }
    ...
    
  8. or download this
    %func = (A => \&namefile, B=> \&openfile, ...)
    ...
    $func{$selec}->();
    Menu();
    
  9. or download this
    my ( $last, $first, $age, $sex, $height, $weight, $comment ) = split (
    +/,/);
    
  10. or download this
    $age[$i++] ={last=>$last,first=>$first,age=>$age,sex=>$sex,height=>$he
    +ight,weight=>$weight,comment=>$comment}
    
  11. or download this
    print "First last=$age[0]{last}\n";