Help for this page

Select Code to Download


  1. or download this
    my $keyword = $ARGV[0] || die << "USAGE";
    
    use: agenda keyword (databasefile separator pos.key)
    ...
    USAGE
    
    # the line above marks the end
    
  2. or download this
    open DB, "<$db_file" or die "Can't open $db_file: $!\n";
    
    # leave out the final \n
    open DB, "<$db_file" or die "Can't open $db_file: $!";
    
  3. or download this
    ### Close database
        close DB;
    
  4. or download this
    my $first_record = <DB>;
    chomp $first_record;
    
    # in one line
    chomp(my $first_record = <DB>);
    
  5. or download this
    @{ $values{$fields[$primary]} } = @fields;
  6. or download this
    $item =~ /$keyword/io;
  7. or download this
    print "\n ** keyword: $item\n\n";
    
    # and
    print "    $names[$features] = $values{$item}[$features]\n";