in reply to Re^2: chdir in perl
in thread chdir in perl

Why do you think chdir is not working?

Make sure you understand the previous responses. They all provide good advice and relevant information. To re-iterate: you should use the chdir function rather than executing the chdir command in a sub-process.

But I wouldn't use chdir myself. I would do something more like the following:

use strict; use warnings; open( my $fh, "/home/raghvens/52xxmodulelist.txt" ) or die $!; foreach my $m (<$fh>) { chomp($m); print "\nProcessing \"$m\" .. \n"; my $path = `/vobs/package134/inttools/modules/unixtools/srce/which +Path $m`; chomp($path); $path .= '/confm/post_REFERENCED_to_EXPERIMENTAL'; print "\tChecking for link \"$path\"\n"; print "YES, Link is present" if(-l $path); }

Replies are listed 'Best First'.
Re^4: chdir in perl
by raghvens (Novice) on Sep 30, 2009 at 13:45 UTC
    Hi, Sorry, for the late response, I was not feeling well. Thanks for your suggestions. It works now!!! I was confused before, as the file post_REFERENCED_to_EXPERIMENTAL was not existing in some directories. I really appreciate for your kind support in making me understand the chdir philosophy... Thanks Again, BR