in reply to RE: Can't use string ("100") as an ARRAY ref while "strict refs" in use at ./divide_con_210.pl line 19.

Where did the idea for this code come from? The coding style doesn't look like "newbie" to me, so most likely you've cargo culted some code from somewhere without really knowing what it does. If so, (actually regardless) you should take a browse through the Tutorials section here. Also Ovid's Begining Perl is also likely to be of interest and is freely available.

Perl is the programming world's equivalent of English
  • Comment on Re^2: Can't use string ("100") as an ARRAY ref while "strict refs" in use at ./divide_con_210.pl line 19.

Replies are listed 'Best First'.
Re^3: Can't use string ("100") as an ARRAY ref while "strict refs" in use at ./divide_con_210.pl line 19.
by lonewolf28 (Beadle) on Jan 02, 2015 at 14:37 UTC
    I'm using the book you've mentioned --Beginning perl by Ovid. This excerpt is from sub-routines chapter 7. I was trying out the code given in the book and got the error. Now i understand what the problem is. Thanks.