in reply to using change directory within perl script
The variable $dir is not interpolated when you use single quotes, try changing them to doubles: "$dir/Hsapiens_fasta_folder"
The idea of File::chdir is to not use chdir() and use $CWD instead:
The idea of File::chdir is to not use chdir() and use $CWD instead:
#!/usr/bin/perl use strict; use File::chdir; my $dir = '/data1/sgb'; $CWD = "$dir/Hsapiens_fasta_folder"; my @files=<*.fa>; $CWD = "$dir/targetp-1.1"; foreach my $file( @files) { print "$file\n"; print "$CWD\n"; }
In Section
Seekers of Perl Wisdom