Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I am not able to post my question! completely as the programe is quite large(500 lines approx) buit when I try to run the programme I get the following errors syntax error at checkdataperl.p line 242, near "for" syntax error at checkdataperl.p line 243, near "++) " syntax error at checkdataperl.p line 278, near "}" Execution of checkdataperl.p aborted due to compilation errors. the lines at which error is reportes are as follows: 111 for($p=0;$p<=$n1;$p++) 112 { 113 for($n=0;$n<=7;$n++) 114 { 115 chop($arrone$p); 116 } 117 118 $corresonedname=($arrone$p."1d");$arrone$p=$arrone$p."astat.gz"; 119 120 121 if ( -e $corresonedname ) 122 { 123 124 for($j=0; $j<=$n2;$j++) 125 { 126 127 if ( $corresonedname eq $arrthree$j) 128 { 129 $arronestore$k=$arrone$p; 130 $arrtwostore$k=$arrtwo$p; 131 $arrthreestore$k=$arrthree$j; 132 $arrfourstore$k=$arrfour$j; 133 134 if (open(NAME ,"$corresonedname")) 135 { 136 137 138 $g=0; 139 140 while(<NAME>) 141 { 142 143 # Read data in 2 columns from file handle 144 # and put in two perl arrays 145 chop(); 146 ($y$g,$x$g) = split(/\s+/); 147 $g++; 148 149 } 150 151 print ("\ng=",$g,"\n"); 152 close (NAME); 153 } 154 155 156 $response="h";$r="f";$ab1=0; 157 158 while ($response ne "abcde") 159 { 160 161 @arrsidtime=("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x"); 162 163 if ($r eq "f") 164 { 165 $y1=0;$y2=0.1;$fmin=$y[0];$fmax=$y[0]; 166 for ($s1=0;$s1<($g-1);$s1++) 167 { 168 if ($fmax < $y$s1) 169 { 170 $fmax=$y$s1; 171 } 172 if ($fmin > $y$s1) 173 { 174 $fmin= $y$s1; 175 } 176 } 177 print ("\n ymax=",$fmax,"Ymin=",$fmin,"\n"); 178 $y1=$fmin; 179 $y2=$fmax; 180 $y2=($y2+0.1); 181 $y1=($y1-0.1); 182 print ("\n y2=",$y2,"y1=",$y1,"\n"); 183 while( $hour ne $arrsidtime$ab1) 184 { 185 186 ++$ab1;$ab2=$ab1 + 1;$r="t"; 187 } 188 } 189 190 pgenv($ab1,$ab2,$y1,$y2,0,0); 191 192 # Define data limits and plot axes 193 194 pglabel("X","Y",$corresonedname); # Labels 195 pgsci(5); # Change colour 196 pgline($g,\@x,\@y); 197 198 print("\n please enter your response for the plot....\n FOR SEEING THE PLOT WITH MODIFIED AXES PLEASE ENTER n \n OR GIVE THE APPROPRIATE QUALITY FACTOR FOR THE FILE FROM 1-9\n ?"); 199 $response=<STDIN>; 200 chop($response); 201 print ("you entered ",$response,"\n"); 202 203 if ($response eq "n" ) 204 { 205 print ("\n Please enter Xmin value\n"); 206 $abr1=<STDIN>;chop($abr1); 207 if ($abr1 ne "") {$ab1=$abr1;} 208 print ("\n Please enter Xmax value\n"); 209 $abr2=<STDIN>;chop($abr2); 210 if ($abr2 ne "") {$ab2=$abr2;} 211 print ("\n Please enter Ymin value\n"); 212 $yr1=<STDIN>;chop($yr1); 213 if ($yr1 ne "") {$y1=$yr1;} 214 print ("\n Please enter Ymax value\n"); 215 $yr2=<STDIN>;chop($yr2); 216 if ($yr2 ne "") {$y2=$yr2;} 217 } 218 elsif(("123456789" =~ m/$response/) && ($response ne "")) 219 { 220 $quality$k=$response;$response="abcde"; 221 print ("\n aulaity ",$k,"=",$quality$k,"\n"); 222 } 223 else 224 { 225 print "\n please enter proper response\n"; 226 } 227 } 228 if ($comparison eq $hour) 229 { 230 $k++; goto NEXTLINE; 231 } 232 else 233 { 234 $hdiffer = &get_RAdiff_fromsun($comparison,$arrthree$k); 235 236 if (($quality eq "1") && ($hdiffer >= 2)) 237 { 238 $calfilename=&gencalfn($corresonedname,$comparison) 239 if (-e $calfilename) 240 { 241 $c2=$c2-1; 242 for($c3=0;$c3<=$c2;$c3++) 243 { 244 if(($calfilename eq $calqname$c3) && ($calqfour$c3 eq "1") && ($calqthree$c3<=100)) 245 { 246 $gooddata="/usr4/mrt/vinayPandey/good".$hour; 247 if (-e $gooddata) 248 {open(FILE, ">>$gooddata"); 249 } 250 else 251 { 252 open(FILE,">$gooddata"); 253 } 254 $qnet=1; 255 print FILE "$arrthreestore$k $arrfourstore$k $arrtwostore$k $quality$k $calqone$c3 $calqtwo$c3 $calqthree$c3 $calqfour$c3 $qnet \n"; 256 close(FILE); 257 $k++; 258 goto NEXTLINE; 259 } 260 else 261 { 262 if ($calfilename eq $claname$c3) 263 { 264 $c2++; 265 $k++; 266 goto NEXTLINE; 267 } 268 } 269 } 270 } 271 } 272 $k++; 273 goto NEXTLINE; 274 275 } 276 } 277 } 278 } 279 else 280 { 281 print "\n we are not able to find file $corresonedname\n"; 282 } 283 NEXTLINE: 284 }

In reply to bug search!! by Anonymous Monk

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-19 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found