[ic] How do I chop a string?

Tom Lichti tom@redpepperracing.com
Sun, 15 Apr 2001 12:30:55 -0400


Try substr():

http://www.perl.com/pub/doc/manual/html/pod/perlfunc/substr.html

Tom

--On Sunday, April 15, 2001 7:20 PM +0300 Rene Hertell <rene@hertell.com> wrote:

> I tried to look at these functions, but they do not seem to work in the
> way I want.. I think there should be a function that lets me specify eg.
> chop_left{$value,10_characters), but I have no clue what the name would
> be...
>
> Rene
>>
>> in perl try using chomp or chop, check the docs. I dont know how to use
>> scratch...
>>
>> > Hi list,
>> >
>> > I'm having a field that contains values inserted by users. My problem
>> > is that when I'm displaying these values, my site-layout will get
>> > broken.
>> >
>> > I could copy the value to a scratch variable, and cut off
>> everything after
>> > the first space, or eg. the 10th character, but I'm not good at
>> this at all
>> > :(
>> >
>> > I'm sure this is easy, but I'm a novice in Perl, so this causes too
>> > much headache for me...
>> >
>> >
>> > Regards, René
>> >
>> >
>> > _______________________________________________
>> > Interchange-users mailing list
>> > Interchange-users@lists.akopia.com
>> > http://lists.akopia.com/mailman/listinfo/interchange-users
>>
>> _________________________________________________________________
>> Get your FREE download of MSN Explorer at http://explorer.msn.com
>>
>>
>> _______________________________________________
>> Interchange-users mailing list
>> Interchange-users@lists.akopia.com
>> http://lists.akopia.com/mailman/listinfo/interchange-users
>>
>
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users