Problems? Is your data what you think it is? | |
PerlMonks |
Re: chopping lots of charactersby hmerrill (Friar) |
on Jun 24, 2004 at 12:12 UTC ( [id://369306]=note: print w/replies, xml ) | Need Help?? |
Yeah you can do that by calling chop 4 times, but that's 4 function calls. Without actually checking performance on this I would think(?) that one call to substring would be faster, but...
that will give you $string containing all but the last 4 characters of what it started with. HTH.
In Section
Seekers of Perl Wisdom
|
|