The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Error!
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-17-2008
looza looza is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 23
Question Error!

#!/usr/local/bin/perl -w


system "ls -iR del-dir > temp";

# Check if entry in hash. If yes, store filename in array

open(INO_FNAME, "temp")|| die "File doesnt exist!" ;
open(FNAMES, ">>filenames") || die "File doesnt exist!" ;
while($record = <INO_FNAME>){
# print $record;
if($record=~ m/:/){
$dir = $record ;
# print "here", $dir, "d \n";
chop $dir;
chop $dir;
}
# print "here", $dir, "dir \n";
($inode,$fname) = split (' ', $record);
if ( exists $FID_DBN_HT{$inode}) {
@file_name = $dir . $fname;
print (FNAMES $dir . $fname, "\n");
print ($inode, "\t fname", $dir . "/" . $fname, "\n");
}
}

close(INO_FNAME);
close(FNAMES);
$end = time;

--------------------
With this I get:
Use of uninitialized value in concatenation (.) or string at temp.pl line 21, <INO_FNAME> line 8.
Use of uninitialized value in concatenation (.) or string at temp.pl line 22, <INO_FNAME> line 8.

Any idea why?
Thanks!