Help for this page

Select Code to Download


  1. or download this
    $choice = lc $choice;
    
    # ... later ...
    
    if ($choice eq 'l')
    
  2. or download this
    my $filename = 'birthday.db';
    
    ...
    open IN, $filename || die "Cannot read '$filename': $!\n";
    print <IN>;
    close IN;
    
  3. or download this
    use constant CHOICE_LIST => 'l';
    my $db_file = 'birthday.db';
    ...
        print <IN>;
        close IN;
    }
    
  4. or download this
    if ($choice eq CHOICE_MODIFY)
    {
    ...
        print OUT "$_:$birthdays{$_}\n" for keys %birthdays;
        close OUT;
    }