in reply to Reaped: mysql...

This is a database question - since you are using mysql you can issue 'desc table' to see what the fields are and how many chars they can hold (after the table is created, of course).

If you are wanting to 'truncate' a string before inserting it into a database, then use substr:

my $field = 'big long string...'; $field = substr($field,0,255); # or a regex (slower of course) $field =~ s/^(.{255}).*$/$1/;
Hope this helps,

jeffa

'Hey, i _tried_ to turn this into a Perl question ;)'