Hi,
I try to use a specific word in my file to put it as a folder name.
This word vary in my file so, I think about use regular expressions to define it.
my $file=$ARGV[0];
my $word=~/DOT\d+/;
my $line="";
open(file, $file);
while( $line = <file>){
if ( $line =~ /^Number\s=\s$word/){
unless(-d $word){
mkdir $word,0755;
chdir $word or die "can't change directory";
}
}
}
close GSE;
Unfortunately, that doesn't work.
Can Perl understand regular expressions in a variable and understand a regular expression in a regular expression?
Thanks for help,
Perlie