You could do that without copying and shifting arrays:
my @tags = qw( ID Name Major Email ); #open FILE, '/home/ajb004/Paradigms/roster.txt' or die $!; while ( <DATA> ) { chomp; ## needed to get rid of \n on e-mail address s/_/ /g; # this doesn't need to be in the inner loop my %fields; my @fields{ @tags } = split /,/; #this is actually a regex print "<TR>\n"; foreach my $tag ( @tags ) { print " <TD>$tag: $fields{$tag}</TD>\n"; } print "</TR>\n"; }
In reply to Re^2: Help Me!
by jwkrahn
in thread Help Me!
by ajbrewe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |