open(LS, "/home/raghvens/52xxmodulelist.txt") or die $!; @modlist = ; @mpath = " "; foreach $m (@modlist) { print "\nProcessing $m .. \n"; $mpath = `/vobs/package134/inttools/modules/unixtools/srce/whichPath $m`; print "\nModule Path is $mpath \n"; `chdir $mpath`; # or die "Can't cd into module path:$mpath \n"; #print "\nCurrent Path is $path"; if(! chdir($mpath)){ print "\n cannot change the working directory \n"; } #`chdir confm`; $file = "post_REFERENCED_to_EXPERIMENTAL"; @output = system ("ls -l $file"); print "YES, Link is present" if $_ =~ /\-\>/ ; }