Array element & string variable

Hello,

I am trying to assign

$string = $a[0]; #a[0]= 10100
print " $string"; # showing 10100

I am using this $string as $result = index($string, $char, $offset);

As above, is not capturing binary nos. in following format;

$string = '10100';

so index is not working.

kindly suggest.

What kind of shell are you using ?

I am using MS DOS.
in windows XP platform.

It's a UNIX forum here. You should post Windows or DOS questions there : Windows & DOS: Issues & Discussions

Hi mate!

Is it Perl :confused:

$result = index($string, $char, $offset);

What did you expect $result to be :confused: Did you set $char :confused: Did you set $offset :confused:
Are you sure index is the right function to get that thing done :confused: :smiley: Using the Perl index() function

Please post your complete script and the wanted output if you need further help :b:

PS: Are you the guy with Perl 8.5? :cool: :wink:

It is capturing binary nos. in the index format.It was the looping statement that was not allowing it to read.Now I corrected it.

Thank you