: I have sucked two substrings into two variables :
: 
: $index = substr $_, 35, 11;
: $value = substr $_, 64, 6;
: 
: These variables may or may not have leading zero/s : 
: 
: 000009/000099/000999........    and so on.
: 
: If they do I need to strip away the leading zeros.

A regexp replacement should do it:

$index =~ s/^0+//;
$value =~ s/^0+//;

The "^" matches the beginning of the string;
the "0+" matches one or more zeros. (If there are none, nothing happens.)
--
Tim Kimball · ACDSD / MAST        ¦ 
Space Telescope Science Institute ¦ We are here on Earth to do good to others.
3700 San Martin Drive             ¦ What the others are here for, I don't know.
Baltimore MD 21218 USA            ¦                           -- W.H. Auden

Reply via email to