in reply to Employing loops and constructing a matrix

chomp($line = < IN >);

<> represents two different operators, readline or glob.    When you have whitespace it becomes the glob operator so you have:

chomp($line = glob 'IN' );

Or simply:

chomp($line = 'IN' );


for ($i=0; $i<@xyzvals; $i++) { $s{$bb}{$xyz[$i]} = $xyzvals[$i]; }

In perl that is usually written as:

for my $i ( 0 .. $#xyzvals ) { $s{ $bb }{ $xyz[ $i ] } = $xyzvals[ $i ]; }

Or you could do the same thing with a hash slice:

@{ $s{ $bb } }{ @xyz[ 0 .. $#xyzvals ] } = @xyzvals;