On 10/28/05, Bowen, Bruce <[EMAIL PROTECTED]> wrote: > The data may look like this: > $DD = "5000|SIHHTEXT"
> I've tried $d = index($DD, m/[^\d]/); > $d = index($DD, /[^\d]/); > $d = index($DD, [^\d]); C<index> doesn't work with regexes. But you can use C<pos> $ perl -e '$DD = "5000|SIHHTEXT"; print pos($DD) if $DD =~ /\D/g' 5 Read about this usage at C<perldoc -f pos>. Adriano. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>