nop has asked for the wisdom of the Perl Monks concerning the following question:
I get this error (under strict, warnings, and diagnostics)... elsif (/size(\d+)/) { $format->set_size($1); } else ...
I can force $1 to be numeric by writingArgument "_size" isn't numeric in multiplication (*) at D:/Perl/site/lib/Spreadsheet/Format.pm line 225 (#1) (W numeric) The indicated string was fed as an argument to an oper +ator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.
but why do I have to do this?$format->set_size(0+$1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 0+$1 for numeric, why?
by chipmunk (Parson) on Dec 02, 2000 at 00:03 UTC | |
by nop (Hermit) on Dec 02, 2000 at 00:09 UTC | |
by chipmunk (Parson) on Dec 02, 2000 at 00:15 UTC |