Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
        my ($site, $userID, $data) = ($1, $2, $3);
        print "SITE: $site   USER: $userID   DATA: $data\n";
    }
    
  2. or download this
    SITE: 012345   USER: 13333   DATA: C C
    SITE: 012345   USER: 13334   DATA: F F
    ...
    SITE: 012346   USER: 13333   DATA: U U
    SITE: 012346   USER: 13334   DATA: I I
    SITE: 012346   USER: 13335   DATA: Y O
    
  3. or download this
      next unless $line =~ m{^(\S+) (\d+) (.*)};
      my ($site, $userID, $data, $data2) = ($1, $2, $3, $4);
    ...
      $user{$userID}{$site} = $data, $data2;
      # $data2 is useless and I think you are trying to use an array ref
      # but that is not what you are doing [ ] signifies an array ref
    
  4. or download this
    print Dumper \%user;