in reply to Interpreting values alternately as $trings and Integers = confused response by Perl

It looks like you used "=", which is assignment, hence Perl is assigning the value 12 to your array element.

On the other hand, your if statement was trying to check if $ary[0] was equal to 12, so you should have used "==" (with no quotes, of course!) as follows :

} elsif ($ary[0] == ...

Hope this helps.

Emanuela.

  • Comment on Re: Interpreting values alternately as $trings and Integers = confused response by Perl
  • Select or Download Code