Paul Lalli wrote:
On Aug 20, 10:47 am, [EMAIL PROTECTED] (Ken Foskey) wrote:
Is there a 'better' way to do this.

Well, if you're sure you know what you're doing, you could just turn
the warning off in the specific scope where you don't want it.  I
mean, it's a warning.  If you're comfortable with what you're doing
(printing a string of spaces as though it was a number), then there's
no reason to care about the warning.  Just disable it as locally as
possible:

$array[0] = substr( $_, 256, 6 );
{
   no warnings 'numeric';

That would better be:

    no warnings qw/numeric uninitialized/;

to cover undefined array elements.

   printf "%06d", $array[0];
}

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to