in reply to substituting values in an array

Here's some code that worked for me:

#!/usr/bin/perl use strict; use warnings; { my @arr = qw/200 201 205 194 140 250 280/; print "Original array is " . join(', ',@arr) . "\n"; @arr = map { $_ > 200 ? 200 : $_ } @arr; print "Limited array is " . join(', ',@arr) . "\n"; }

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds