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 |