Why not split it into an array first:

@fields =~ split(!/!, $string);

$index = $fields(3);
$value = $fields(5);

Just remember that arrays start at an index of zero so in each case
you will be asking for the field you want - 1.


On Thu, 19 Apr 2001 15:40:27 +0000, [EMAIL PROTECTED] (Mark Martin)
wrote:

>Hi all,
>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.
>
>Any ideas?
>
>Mark


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to