[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] truncating



Rick wrote:
> 
> how do i truncate something?  say...a variable or an element in an
> array...  i tried 
> 
> truncate($cm[1][0],300);
> 
> and it definately did not truncate the element.  does the number mean 300
> bytes or characters or what?  the help file is very vague.  how does this
> work exactly?  please help.  thanx.
> 

The help file seems very clear in saying that truncate() truncates
*files*.  You can't use it to truncate variables.


substr($cm[1][0], 300) = '';


Ronald

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org