Hey,
I am a beginner for Perl. Had a basic question. Would appreciate the help.
______________________________________________________
#!/usr/bin/perl # change_directory.pl use warnings; use strict; use Cwd; #list the Timepoint directories my @TP_dir = glob("T*"); print @TP_dir, "\n"; #list the first timepoint directory print $TP_dir[0], "\n"; my $current_dir = getcwd(); print $current_dir; chdir ("$current_dir/$TP_dir[0]") or die "Can't change directory to TP + $!\n"; ________________________________________________________
I am running my perl script in DOS and here is the output:
C:\Documents and Settings\Punita Sharma\Desktop\ExperimentDate>pe tory.pl T1T2 T1 C:/Documents and Settings/Punita Sharma/Desktop/ExperimentDate C:\Documents and Settings\Punita Sharma\Desktop\ExperimentDate>
_________________________________________________
Essentially my problem is that I am not able to get the chdir to work. I'd like to use the mkdir within the T1 and T2 subdirectories.
Thanks
20101027 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
In reply to chdir problem by PerlBeginNew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |