MVRS has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks , i think the script previously given was confusing ,this is the script i want to run now, which is not creating directory, please help me in this
please dont mynd if the code is idiotic , as am jus beginner in perl , suggest me the write approach for this script and if any error
output_folder1.txt contains 10010, and output_folder.txt_2 contains 30001
am getting output file cannot be created
#!/usr/local/bin/perl -w use strict; print "Content-type:text/html\n\n"; my(@folder_name,$temp1,$temp2); open ONE,"<","/var/www/html/piRNA_html/UNAFold/output_folder_1.txt" || + die "Cannot open the file"; @folder_name=<ONE>; close ONE; open TWO,"<","/var/www/html/piRNA_html/UNAFold/output_folder_2.txt" || + die "Cannot open the file"; push(@folder_name,<TWO>); close TWO; print $folder_name[0],"\n",$folder_name[1],"\n"; $temp1 = pop(@folder_name); $temp2 = pop(@folder_name); if($temp1 < 30050) { mkdir "/var/www/html/piRNA_html/UNAFold/output/$temp2/$temp1",0777 + or die "File cannot be created"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mkdir failing
by bart (Canon) on Dec 02, 2011 at 11:58 UTC | |
by MVRS (Acolyte) on Dec 03, 2011 at 04:07 UTC | |
|
Re: Mkdir failing
by NetWallah (Canon) on Dec 02, 2011 at 16:53 UTC | |
|
Re: Mkdir failing
by Anonymous Monk on Dec 02, 2011 at 12:09 UTC | |
|