Help for this page

Select Code to Download


  1. or download this
    my @records;
    @records = qw( name ID email phone );
    
  2. or download this
    while (<DATA>) {
        chomp;
        my ($key, $value) = split;
    ...
        $record{$key} = $value;
        push @records, \%record;
    }
    
  3. or download this
    foreach my $rec (@records) {
        print "ID: $rec->{ID}\n";
        print "Name: $rec->{name}\n";
    }