|Just another Perl shrine|
chopping lots of charactersby Anonymous Monk
|on Jun 24, 2004 at 11:35 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Quick and easy question i'm sure, but how can I chop off the last 4 characters from a string using chop.
I can do this:
Thats a little bit ugly though.
I realise I can probably use substr, but wondered if there was a cool way to do it with chop.