[Jax.PM] ~9M lines of data

J Proctor jproctor at marlboro.edu
Mon Oct 14 20:01:22 CDT 2002


> CREATE TABLE ... (
> Row
> Row
> Row
> )

You really want that whitespace stripped, eh?  Hmm.  Rearrange the
conditional print and do it when you've got the flag set.  No point in
stripping whitespace on your "INSERT INTO" lines.

if ($flag)
    {
    s/^\s+//;
    s/\s+$//;
    print OUTFILE $_, "\n";
    }


> Actually, recent Perl versions the RegEx and the Index (substr, rindex,
> index) stuff - performance is about the same.

You're gonna make me go prove this to myself, aren't you?  Feh.

But I was also curious if /\s/ matches ' ' slower than / / does.  I guess
I hope not, since that's the default in Perl 6.


j




More information about the Jacksonville-pm mailing list