regex - Perl file treatment is limited in size? -
i've made translator in perl messageboard migration, applying regexes , print result. write stdout file , here go ! problem program won't work after 18 mb written !
i've made translate.pl ( https://gist.github.com/914450 ) , launch line : $ perl translate.pl mydump.sql > mydump-bbcode.sql
really sorry quality of code never use perl... tried sed same work didn't manage apply regex found in original script.
[edit] reworked code , sanitized regexes (see gist.github.com/914450) i'm still stuck. when splited big dump in 15m files, launched translate.pl 7(processes) 7 use cores script stops @ variable size. "tail" command doesn't show complex message on url when stops...
thanks guys ! let know if manage finally
yikes - start basics:
use strict; use warnings; ..at top of script. complain not declaring lexicals, go ahead , that. don't see obvious truncating file, perhaps 1 or more of regexes pathological. also, undefs @ end not needed.
for doing, might consider using sed
Comments
Post a Comment