Use of uninitialized value Error
- From: dowda@xxxxxxxxxxxxxxxxxx (David Gilden)
- Date: Fri, 30 Dec 2005 14:02:55 -0600
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)
.
- Follow-Ups:
- Re: Use of uninitialized value Error
- From: John W. Krahn
- Re: Use of uninitialized value Error
- From: JupiterHost.Net
- Re: Use of uninitialized value Error
- Prev by Date: Re: checking gzip files
- Next by Date: Re: checking gzip files
- Previous by thread: A "sub" question...
- Next by thread: Re: Use of uninitialized value Error
- Index(es):
Relevant Pages
|
|