![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk Shell Script error : "Syntax Error : `Split' unexpected | Herry | UNIX for Dummies Questions & Answers | 2 | 03-17-2008 11:16 AM |
| error during run: St9bad_alloc - Getting this error while using some conversion progr | sathu_pec | Shell Programming and Scripting | 1 | 01-21-2008 02:38 AM |
| I got error like...syntax error on line 1, teletype | koti_rama | UNIX for Advanced & Expert Users | 2 | 07-07-2007 07:35 PM |
| error reading sections error at install | doelman | SUN Solaris | 2 | 02-05-2007 12:21 PM |
| Error: Internal system error: Unable to initialize standard output file | firkus | UNIX for Dummies Questions & Answers | 2 | 10-25-2005 03:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
#!/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! |
|
||||
|
Those are warnings, not errors. This line in your code should just be removed:
@file_name = $dir . $fname; it appears to not be doing anything and its not the correct way to assign values to an array anway. Do this to try and track down the missing scalar value: Code:
($inode,$fname) = split (' ', $record);
print "[$inode] - [$fname]\n";
I think one or both of those scalars is not getting defined. The [] are to let you know if they are blank. Or you could just drop the -w switch on the shebang line and the warnings will not be output. |
| Sponsored Links | ||
|
|