hii monks, nyc to meet u in this discussion and thanks in advance for helping in this

Problem: here with this script am unable to make a directory , am running it as cgi, please help me in this

#!/usr/local/bin/perl -w print "Content-type:text/html\n\n"; use File::Copy; use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard); #use strict; my($jobname,$sequence,$temperature,$sodium,$folding,$magnesium,$label, +$window); my(@folder_name,$temp1,$temp2); #my(@argument); $jobname = param('jobname'); $sequence = param('sequence'); $temperature = param('temperature'); $sodium = param('sodium'); $folding = param('folding'); $magnesium = param('magnesium'); $label = param('label'); $window = param('window'); 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(my @folder_name,<TWO>); close TWO; #print $folder_name[0],"\n", $folder_name[1]; $temp1 = pop(@folder_name); $temp2 = pop(@folder_name); if($temp1 < 30050) { mkdir "/var/www/html/piRNA_html/UNAFold/output/$temp2/$temp1",0775 +; open DAT,">","/var/www/html/piRNA_html/UNAFold/output/$temp2/$temp1/$j +obname" || die "Can't open the file "; print DAT my $sequence; print ($temp2,$temp1,$jobname); close DAT; my $location = "/var/www/html/piRNA_html/UNAFold/output/$temp2/$temp1" +; my $file1 = "unafold2.cgi"; copy $file1,$location || die "File cannot be copied."; system("chmod 777 $location/$file1"); $temp1++; open THREE,">","/var/www/html/piRNA_html/UNAFold/output_folder_2. +txt" || die "Can't open the file"; #print THREE $temp1; close THREE; } else { $temp1 = 30001; $temp2++; mkdir "/var/www/html/piRNA_html/UNAFold/output/$temp2",0777; mkdir "/var/www/html/piRNA_html/UNAFold/output/$temp2/$temp1",0777 +; open DAT,">/var/www/html/piRNA_html/UNAFold/output/$temp2/$tem +p1/$jobname" || die "Can't open the file "; print DAT $sequence; close DAT; my $location = "/var/www/html/piRNA_html/UNAFold/output/$temp2/$temp1" +; my $file1 = "unafold2.cgi"; copy $file1,$location || die "File cannot be copied."; system("chmod 777 $location/$file1"); $temp1++; open FOUR,">/var/www/html/piRNA_html/UNAFold/output_folder_2.txt" +|| die "Can't open the file"; print FOUR $temp1; close FOUR; open FIVE,">/var/www/html/piRNA_html/UNAFold/output_folder_1.txt" +|| die "Can't open the file"; print FIVE $temp2; close FIVE; }

In reply to problem in mkdir by MVRS

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.