#Updates web_setup sub vpenv { open(MYFILE, "$location/$dir/$site/$vpfile") || die "Unable to open fi +le: $!"; my @stuff=<MYFILE>; $stuff[0]="setenv DSCUSTOMER $db\n"; $stuff[1]="setenv DSSITENO $sno\n"; $stuff[2]="setenv DSCUSTID $sid\n"; open STDOUT, ">$location/$dir/$site/$vpfile" || die "Unable to Write t +o file: $! "; print @stuff; close(STDOUT); close(MYFILE); } #Updates database.form sub vpdb { open(MYFILE, "$location/$dir/$site/$vpdir/$vpdata") || die "Unable to +Open File: $ !"; my @thing=<MYFILE>; $thing[0]=".ARG DATABASE $db\n"; open STDOUT, ">$location/$dir/$site/$vpdir/$vpdata" || die "Unable to +Write to Fil e: $!"; print @thing; close(STDOUT); close(MYFILE); } &vpenv; &vpdb;
In reply to Filehandle Error by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |