Hi,
I am new for perl. I wrote a perl script to replace the variables in a file. But I got error message: out of memory during "large" request for 67112960 bytes, total sbrk() is 5152738
8 bytes at ../autobackend/bin/backend.plx line 30, <READ_FSTLD_FILE> line 1.
I do not understand this error message. Following are the codes:
#!/usr/bin/perl -s
$run_cmd = "|fastload >> ../autobackend/log/" . $OutFile . "_load.log 2>&1";
open(READ_FSTLD_FILE, "$fstldfile") || die "\n Could not open file: $fstldfile for read";
open(TO_FSTLD_FILE, $run_cmd) || die "\n Could not open file fastload file for write";
while ($current_line = <READ_FSTLD_FILE>) {
chop($current_line);
$current_line =~ s/$UNAME/$Uname/g;
$current_line =~ s/$PASSWD/$Passwd/g;
$current_line =~ s/$TARGET_TBL/$Target_tbl/g;
$current_line =~ s/$ERROR_TBL1/$Error_tbl1/g;
$current_line =~ s/$ERROR_TBL2/$Error_tbl2/g;
$current_line =~ s/$FILENAME/$FileName/g;
$current_line =~ s/$LINK_CD/$OutFile/g;
print TO_FSTLD_FILE "$current_line\n";
print "$current_lines\n";
}
close(READ_FSTLD_FILE);
When I run this perl file, pass the arguments like:
../autobackend/bin/backend.plx -s -fileoption="fastload" -fstldfile="../autobackend/tmp/run_test.load" -Uname="xxxx" -passwd="xxxx" -Target_tbl="test" -Error_tbl1="test_err1" -Error_tbl2="test_err2" -FileName="testperl.txt" -OutFile="testxx"
Many thanks in advance.
J
I am new for perl. I wrote a perl script to replace the variables in a file. But I got error message: out of memory during "large" request for 67112960 bytes, total sbrk() is 5152738
8 bytes at ../autobackend/bin/backend.plx line 30, <READ_FSTLD_FILE> line 1.
I do not understand this error message. Following are the codes:
#!/usr/bin/perl -s
$run_cmd = "|fastload >> ../autobackend/log/" . $OutFile . "_load.log 2>&1";
open(READ_FSTLD_FILE, "$fstldfile") || die "\n Could not open file: $fstldfile for read";
open(TO_FSTLD_FILE, $run_cmd) || die "\n Could not open file fastload file for write";
while ($current_line = <READ_FSTLD_FILE>) {
chop($current_line);
$current_line =~ s/$UNAME/$Uname/g;
$current_line =~ s/$PASSWD/$Passwd/g;
$current_line =~ s/$TARGET_TBL/$Target_tbl/g;
$current_line =~ s/$ERROR_TBL1/$Error_tbl1/g;
$current_line =~ s/$ERROR_TBL2/$Error_tbl2/g;
$current_line =~ s/$FILENAME/$FileName/g;
$current_line =~ s/$LINK_CD/$OutFile/g;
print TO_FSTLD_FILE "$current_line\n";
print "$current_lines\n";
}
close(READ_FSTLD_FILE);
When I run this perl file, pass the arguments like:
../autobackend/bin/backend.plx -s -fileoption="fastload" -fstldfile="../autobackend/tmp/run_test.load" -Uname="xxxx" -passwd="xxxx" -Target_tbl="test" -Error_tbl1="test_err1" -Error_tbl2="test_err2" -FileName="testperl.txt" -OutFile="testxx"
Many thanks in advance.
J