Chris Stinemetz wrote:
  How can I check that the value assigned to $cell and $sector is numeric
before I try to call the sprintf function?

I am just trying to clear this warning.

Argument "" isn't numeric in sprintf at ./rt_evdo_pcmd.pl line 139,<$FIN>
line 119503.

line 139 is from my program is below:

my $c_s = sprintf("%d_%d",$cell,$sector);

Why are you using sprintf for something you could do with string interpolation:

my $c_s = "${cell}_$sector";



John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction.                   -- Albert Einstein

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to