Use of uninitialized value Error



Hello,

In the Script below the line: last if ($num >= 35)
is giving me this error: Use of uninitialized value in int

How do I avoid this error?


my @files contains: Gambia001.tiff through Gambia100.tiff

#!/usr/bin/perl -w

my @files =<*>;
$tmp= 1;


for (@files){
my $old = $_;
$_ =~ /(\d+)/;
$num = int($1);
#$_ =~s/Gambia_Pa_Bobo_kuliyo_\d+/Gambia_Pa_Bobo_kuliyo_$tmp/i;
print "$num\n";
#$tmp++;
last if ($num >= 35);
# rename($old,$_);
}

Thx,
Dave GIlden
(kora musician / audiophile / webmaster @ www.coraconnection.com / Ft. Worth, TX, USA)
.



Relevant Pages

  • Re: Scanset
    ... > int main ... Thx a lot Pete! ... Prev by Date: ...
    (comp.lang.c)
  • Re: more hand written integer pow() functions (LONG POST)
    ... > trying to avoid implementation defined behavior. ... static int ibmpow ... I tested by replacing the test loop ... And the ibmpow() version is still faster than pow_b. ...
    (comp.lang.c)
  • Re: Error-names.
    ... > C-program as constants? ... > int year; ... > the compiler says: ... > to avoid. ...
    (comp.lang.ada)
  • [ncurses] cat xxx |more
    ... int main ... int ch, prev, row, col; ... Works something like a linux cat. ... But this program is limited by *term window size. ...
    (comp.unix.programmer)
  • Re: Casting in a generic function
    ... I want to avoid having to write custom convert functions for my enums so ... I want to convert to an int and cast to the enum, ... The cast fails inside the generic function even though its valid. ...
    (microsoft.public.dotnet.languages.csharp)