I am getting the unix path in a variable and want to cd into that path, But I am unable to cd into the path. Here is the script.
open(LS, "/home/raghvens/52xxmodulelist.txt") or die $!; @modlist = <LS>; @mpath = " "; foreach $m (@modlist) { print "\nProcessing $m .. \n"; $mpath = `/vobs/package134/inttools/modules/unixtools/srce/whichPat +h $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 $_ =~ /\-\>/ ; }
In reply to chdir in perl by raghvens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |